idnits 2.17.1 draft-liu-dhc-dhcp-yang-model-07.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 37 instances of too long lines in the document, the longest one being 43 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 189 has weird spacing: '...address yan...' == Line 192 has weird spacing: '...tart-ip ine...' == Line 238 has weird spacing: '...up-name str...' == Line 427 has weird spacing: '... type inet:...' == Line 431 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 (October 12, 2018) is 2017 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 85, but not defined == Unused Reference: 'RFC2131' is defined on line 746, but no explicit reference was found in the text == Unused Reference: 'RFC2629' is defined on line 750, but no explicit reference was found in the text == Unused Reference: 'RFC6021' is defined on line 759, but no explicit reference was found in the text == Unused Reference: 'RFC7950' is defined on line 763, 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: April 2019 C. Chen 5 Ericsson 6 October 12, 2018 8 Yang Data Model for DHCP Protocol 9 draft-liu-dhc-dhcp-yang-model-07.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 April 12, 2009. 38 Copyright Notice 40 Copyright (c) 2018 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 ................... Error! Bookmark not defined. 61 2.4. DHCP Client ............................................ 5 62 3. DHCP YANG Module ............................................ 7 63 4. Security Considerations ..................................... 16 64 5. Contributors ............................................... 16 65 6. IANA Considerations ........................................ 16 66 7. Normative References........................................ 17 68 1. Introduction 70 This document defines a YANG [RFC6020] data model that can be used to 71 configure and manage DHCP. 73 This data model includes configuration data and state data, in which 74 DHCP server, replay, and client nodes are defined. 76 1.1. Terminology 78 The key words "MUST", "MUST NOT", "REQUIRED", "SHALL", "SHALL NOT", 79 "SHOULD", "SHOULD NOT", "RECOMMENDED", "NOT RECOMMENDED", "MAY", and 80 "OPTIONAL" in this document are to be interpreted as described in BCP 14 81 [RFC2119]. 83 The following terms are used within this document: 85 The following terms are defined in [RFC6241] and are not redefined here: 87 o client 89 o configuration data 91 o server 92 o state data 94 The following terms are defined in [RFC6020] and are not redefined here: 96 o augment 98 o data model 100 o data node 102 o presence container 104 1.2. Tree Diagrams 106 A simplified graphical representation of the data model is used in this 107 document. The meaning of the symbols in these diagrams is as follows: 109 o Brackets "[" and "]" enclose list keys. 111 o Abbreviations before data node names: "rw" means configuration (read- 112 write), and "ro" means state data (read-only). 114 o Symbols after data node names: "?" means an optional node, "!" means 115 a presence container, and "*" denotes a list and leaf-list. 117 o Parentheses enclose choice and case nodes, and case nodes are also 118 marked with a colon (":"). 120 o Ellipsis ("...") stands for contents of subtrees that are not shown. 122 2. Design of Data Model 124 The goal of this document is to define a data model that provides a 125 common user interface to the DHCP protocol. There is very information 126 that is designated as "mandatory", providing freedom for vendors to 127 adapt this data model to their respective product implementations. 129 2.1. Overview 131 The overall structure of the model is described as the following. 133 module: ietf-dhcp 134 +--rw dhcp 135 | +--rw server 136 | | ... 137 | | ... 138 | +--rw relay 139 | | ... 140 | | ... 141 | +--rw client 142 ... 143 ... 145 Furthermore, design three if-feature for deployment of DHCP 146 server/relay/client as below: 147 feature dhcp-server { 148 description "Feature DHCP server"; 149 } 151 feature dhcp-client { 152 description "Feature DHCP client"; 153 } 155 feature dhcp-relay { 156 description "Feature DHCP relay"; 157 } 159 2.2. DHCP Server 161 Server contain the configuration items, including lease time, ping 162 packet, IP address pool, option. And also include the operational data 163 for server. 165 The most important part is the IP pool configuration. Specifying IP 166 address section is for dynamic allocation. Configuring the mapping 167 between IP address and MAC address is for manual allocation. 169 module: ietf-dhcp 170 +--rw server {server}? 171 | +--rw lease-time? uint32 172 | +--rw ping-packet-number? uint8 173 | +--rw ping-packet-timeout? uint16 174 | +--rw option 175 | | +--rw dhcp-server-identifier? inet:ip-address 176 | | +--rw domain-name? string 177 | | +--rw domain-name-server? inet:ip-address 178 | | +--rw interface-mtu? uint32 179 | | +--rw netbios-name-server? inet:ip-address 180 | | +--rw netbios-node-type? uint32 181 | | +--rw netbios-scope? string 182 | +--rw ip-pool* [ip-pool-name] 183 | | +--rw ip-pool-name string 184 | | +--rw interface? if:interface-ref 185 | | +--rw gateway-ip? inet:ip-address 186 | | +--rw gateway-mask? inet:ip-prefix 187 | | +--rw lease-time? uint32 188 | | +--rw manual-allocation* [mac-address ip-address] 189 | | | +--rw mac-address yang:mac-address 190 | | | +--rw ip-address inet:ip-address 191 | | +--rw section* [start-ip] 192 | | | +--rw start-ip inet:ipv4-address 193 | | | +--rw end-ip? inet:ipv4-address 194 | | +--rw option 195 | | | +--rw dhcp-server-identifier? inet:ip-address 196 | | | +--rw domain-name? string 197 | | | +--rw domain-name-server? inet:ip-address 198 | | | +--rw interface-mtu? uint32 199 | | | +--rw netbios-name-server? inet:ip-address 200 | | | +--rw netbios-node-type? uint32 201 | | | +--rw netbios-scope? string 202 | | +--ro used-ip-count? uint32 203 | | +--ro idle-ip-count? uint32 204 | | +--ro conflict-ip-count? uint32 205 | | +--ro total-ip-count? uint32 206 | +--ro packet-statistics* [interface] 207 | | +--ro interface if:interface-ref 208 | | +---x clean-statistics 209 | | +--ro receive 210 | | | +--ro decline-packet? uint32 211 | | | +--ro discover-packet? uint32 212 | | | +--ro request-packet? uint32 213 | | | +--ro release-packet? uint32 214 | | | +--ro inform-packet? uint32 215 | | +--ro send 216 | | +--ro offer-packet? uint32 217 | | +--ro ack-packet? uint32 218 | | +--ro nack-packet? uint32 219 | +--ro host 220 | +--ro interface? if:interface-ref 221 | +--ro host-ip? string 222 | +--ro host-hardware-address? string 223 | +--ro lease? uint32 224 | +--ro type? allocate-type 226 2.3. DHCP Relay 228 The relay function is configured per interface. Enable/disable relay 229 functionality on a specific interface, and specify the DHCP server. 231 module: ietf-dhcp 232 +--rw dchp 233 +--rw server 234 ... 235 ... 236 +--rw relay {relay}? 237 | +--rw server-group* [server-group-name] 238 | +--rw server-group-name string 239 | +--rw interface? if:interface-ref 240 | +--rw gateway-address? inet:ipv4-address 241 | +--rw server-address* inet:ipv4-address 242 | +--ro packet-statistics 243 | +---x clean-statistics 244 | +--ro receive 245 | | +--ro offer-packet? uint32 246 | | +--ro ack-packet? uint32 247 | | +--ro nack-packet? uint32 248 | | +--ro decline-packet? uint32 249 | | +--ro discover-packet? uint32 250 | | +--ro request-packet? uint32 251 | | +--ro release-packet? uint32 252 | | +--ro inform-packet? uint32 253 | +--ro send 254 | +--ro offer-packet? uint32 255 | +--ro ack-packet? uint32 256 | +--ro nack-packet? uint32 257 | +--ro decline-packet? uint32 258 | +--ro discover-packet? uint32 259 | +--ro request-packet? uint32 260 | +--ro release-packet? uint32 261 | +--ro inform-packet? uint32 263 2.4. DHCP Client 265 DHCP client is also managed per interface, including enable/disable 266 client DHCP client function, client id and lease time. The packet 267 statistics for the DHCP client is also included. 269 module: ietf-dhcp 270 +--rw dchp 271 +--rw server 272 ... 273 ... 274 +--rw relay 275 ... 277 ... 278 +--rw client {client}? 279 +--rw interfaces* [interface] 280 +--rw interface if:interface-ref 281 +--rw client-id? string 282 +--rw lease? uint32 283 +--ro packet-statistics 284 +---x clean-statistics 285 +--ro receive 286 | +--ro offer-packet? uint32 287 | +--ro ack-packet? uint32 288 | +--ro nack-packet? uint32 289 +--ro send 290 +--ro decline-packet? uint32 291 +--ro discover-packet? uint32 292 +--ro request-packet? uint32 293 +--ro release-packet? uint32 294 +--ro inform-packet? uint32 296 3. DHCP YANG Module 298 file "ietf-dhcp@2108-10-11.yang" 299 module ietf-dhcp { 300 yang-version 1.1; 301 namespace "urn:ietf:params:xml:ns:yang:ietf-dhcp"; 302 prefix "dhcp"; 304 import ietf-inet-types { 305 prefix "inet"; 306 } 307 import ietf-yang-types { 308 prefix "yang"; 309 } 310 import ietf-interfaces { 311 prefix "if"; 312 } 314 organization "IETF dhc (Dynamic Host Configuration Protocol) 315 Working Group"; 316 contact "leo.liubing@huawei.com 317 loukunkun@huawei.com 318 chin.chen@ericsson.com"; 319 description "The module for implementing DHCP protocol"; 321 revision "2018-10-11" { 322 description "initial draft revision"; 323 reference "rfc2131 rfc6020 rfc7950"; 324 } 326 /*--------------------*/ 327 /* Features */ 328 /*--------------------*/ 329 feature server { 330 description "Feature DHCP server"; 331 } 333 feature client { 334 description "Feature DHCP client"; 335 } 336 feature relay { 337 description "Feature DHCP relay"; 338 } 340 /*--------------------*/ 341 /* Types Defination */ 342 /*--------------------*/ 343 typedef allocate-type { 344 type enumeration { 345 enum automatic { 346 description 347 "DHCP assigns a permanent IP address to a client"; 348 } 349 enum dynamic { 350 description 351 "DHCP assigns an IP address to a client 352 for a limited period of time"; 353 } 354 enum manual { 355 description 356 "a client's IP address is assigned by the 357 network administrator, and DHCP is used 358 simply to convey the assigned address to the client"; 359 } 360 } 361 description "Mechanisms for IP address allocation"; 362 } 364 /*--------------------*/ 365 /* Groupings */ 366 /*--------------------*/ 367 grouping server-packet { 368 description "The packets are sent from server "; 369 leaf offer-packet { 370 type uint32; 371 config "false"; 372 description "Total number of DHCPOFFER packets"; 373 } 374 leaf ack-packet { 375 type uint32; 376 config "false"; 377 description "Total number of DHCPACK packets"; 378 } 379 leaf nack-packet { 380 type uint32; 381 config "false"; 382 description "Total number of DHCPNAK packets"; 383 } 384 } 386 grouping client-packet { 387 description "The packets are sent from client "; 389 leaf decline-packet { 390 type uint32; 391 config "false"; 392 description "Total number of DHCPDECLINE packets"; 393 } 394 leaf discover-packet { 395 type uint32; 396 config "false"; 397 description "Total number of DHCPDISCOVER packets"; 398 } 399 leaf request-packet { 400 type uint32; 401 config "false"; 402 description "Total number of DHCPREQUEST packets"; 403 } 404 leaf release-packet { 405 type uint32; 406 config "false"; 407 description "Total number of DHCPRELEASE packets"; 408 } 409 leaf inform-packet { 410 type uint32; 411 config "false"; 412 description "Total number of DHCPINFORM packets"; 413 } 414 } 415 grouping sum-packet { 416 description "All of commnicated packets between server and client"; 418 uses server-packet; 420 uses client-packet; 421 } 423 grouping dhcp-option { 424 description "Configuration option"; 426 leaf dhcp-server-identifier { 427 type inet:ip-address; 428 description "DHCP server identifier"; 429 } 430 leaf domain-name { 431 type string; 432 description "Name of the domain"; 433 } 434 leaf domain-name-server { 435 type inet:ip-address; 436 description "IPv4 address of the domain"; 437 } 438 leaf interface-mtu { 439 type uint32 { 440 range "0..65535"; 441 } 442 description "Minimum Transmission Unit (MTU) of the interface"; 443 } 444 leaf netbios-name-server { 445 type inet:ip-address; 446 description "NETBIOS name server"; 447 } 448 leaf netbios-node-type { 449 type uint32 { 450 range "0..65535"; 451 } 452 description "NETBIOS node type"; 453 } 454 leaf netbios-scope { 455 type string; 456 description "NETBIOS scope"; 457 } 458 } 460 /*--------------------*/ 461 /* Configuration Data */ 462 /*--------------------*/ 463 container dhcp { 464 description 465 "DHCP configuration"; 466 container server { 467 if-feature server; 468 description 469 "DHCP server configuration"; 470 leaf lease-time { 471 type uint32{ 472 range "180..31536000"; 473 } 474 description 475 "Default network address lease time assigned to DHCP clients"; 476 } 477 leaf ping-packet-number{ 478 type uint8 { 479 range "0..10"; 480 } 481 default "0"; 482 description "Number of ping packets"; 483 } 484 leaf ping-packet-timeout { 485 type uint16 { 486 range "0..10000"; 487 } 488 default "500"; 489 description "Timeout of ping packet"; 490 } 491 container option { 492 description "Configuration option"; 493 uses dhcp-option; 494 } 495 list ip-pool { 496 key "ip-pool-name"; 497 description "Global IP pool configuration"; 499 leaf ip-pool-name { 500 type string { 501 length "1..64"; 502 } 503 description "Name of the IP pool"; 504 } 505 leaf interface { 506 type if:interface-ref; 507 description 508 "Name of the interface"; 510 } 511 leaf gateway-ip { 512 type inet:ip-address; 513 description "IPv4 address of the gateway"; 514 } 515 leaf gateway-mask { 516 type inet:ip-prefix; 517 description "Network submask of the gateway"; 518 } 519 leaf lease-time { 520 type uint32 { 521 range "180..31536000"; 522 } 523 description 524 "Default network address lease time assigned to DHCP clients"; 525 } 526 list manual-allocation { 527 key "mac-address ip-address"; 528 description "Mapping from MAC address to IP address"; 530 leaf mac-address { 531 type yang:mac-address; 532 description "MAC address of the host"; 533 } 534 leaf ip-address { 535 type inet:ip-address; 536 description "IPv4 address of the host"; 537 } 538 } 539 list section { 540 key "start-ip"; 541 description "IPv4 address for the range"; 542 leaf start-ip { 543 type inet:ipv4-address; 544 mandatory "true"; 545 description "Starting IPv4 Address of a section"; 546 } 547 leaf end-ip { 548 type inet:ipv4-address; 549 description "Last IPv4 Address of a section"; 550 } 551 } 552 container option { 553 description "Configuration option"; 554 uses dhcp-option; 555 } 556 leaf used-ip-count { 557 type uint32; 558 config "false"; 559 description "Total number of used IPv4 addresses"; 560 } 561 leaf idle-ip-count { 562 type uint32; 563 config "false"; 564 description "Total number of idle IPv4 addresses"; 565 } 566 leaf conflict-ip-count { 567 type uint32; 568 config "false"; 569 description "Total number of conflict IPv4 addresses"; 570 } 571 leaf total-ip-count { 572 type uint32; 573 config "false"; 574 description "Total number of IPv4 addresses"; 575 } 576 } 578 list packet-statistics { 579 key "interface"; 580 config "false"; 581 description "Packet statistics"; 583 leaf interface { 584 type if:interface-ref; 585 description "Name of the interface"; 586 } 588 action clean-statistics { 589 description "Clear the specific interface statistics"; 590 } 592 container receive { 593 description "Number of received packets"; 595 uses client-packet; 596 } 597 container send { 598 description "Number of sent packets"; 600 uses server-packet; 601 } 602 } 603 container host { 604 config "false"; 605 description "Host status information"; 606 leaf interface { 607 type if:interface-ref; 608 description "Name of the interface"; 609 } 610 leaf host-ip { 611 type string; 612 description "IPv4 address of the host"; 613 } 614 leaf host-hardware-address { 615 type string; 616 description "MAC address of the host"; 617 } 618 leaf lease { 619 type uint32; 620 description "Default network address lease 621 time assigned to DHCP clients"; 622 } 623 leaf type { 624 type allocate-type; 625 description "Mechanisms for IP address allocation"; 626 } 627 } 628 } 629 container relay { 630 if-feature relay; 631 description "DHCP relay agent configuration"; 633 list server-group { 634 key "server-group-name"; 635 description 636 "DHCP server group configuration that DHCP relays to"; 637 leaf server-group-name { 638 type string; 639 description "Name of a DHCP server group"; 640 } 641 leaf interface { 642 type if:interface-ref; 643 description "Name of the interface"; 644 } 645 leaf gateway-address { 646 type inet:ipv4-address; 647 description "IPv4 address of the gateway"; 648 } 649 leaf-list server-address { 650 type inet:ipv4-address; 651 description "IPv4 address of the server"; 652 } 654 container packet-statistics { 655 config "false"; 656 description "Packet statistics"; 658 action clean-statistics { 659 description "Clear the specific interface statistics"; 660 } 661 container receive { 662 description "Number of received packets"; 664 uses sum-packet; 665 } 666 container send { 667 description 668 "Number of sent packets"; 670 uses sum-packet; 671 } 672 } 673 } 674 } 675 container client { 676 if-feature client; 677 description "DHCP client configuration"; 679 list interfaces { 680 key "interface"; 681 description "Interface configuration"; 683 leaf interface { 684 type if:interface-ref; 685 description "Name of the interface"; 686 } 687 leaf client-id { 688 type string; 689 description "DHCP client identifier"; 690 } 691 leaf lease { 692 type uint32 { 693 range "1..4294967295"; 694 } 695 description "Default network address lease time assigned to DHCP clients"; 696 } 697 container packet-statistics { 698 config "false"; 699 description "Packet statistics"; 701 action clean-statistics { 702 description "Clear the specific interface statistics"; 703 } 705 container receive { 706 description "Number of received packets"; 708 uses server-packet; 709 } 711 container send { 712 description "Number of sent packets"; 714 uses client-packet; 715 } 716 } 717 } 718 } 719 } 720 } 721 723 4. Security Considerations 725 The data model defined does not create any security implications. 727 5. Contributors 729 The following people all contributed significantly to the initial 731 YANG model: 733 - Gang Yan (Huawei) 735 - Hongying Sheng (Ericsson) 737 6. IANA Considerations 739 This draft does not request any IANA action. 741 7. Normative References 743 [RFC2119] Bradner, S., "Key words for use in RFCs to Indicate 744 Requirement Levels", BCP 14, RFC 2119, March 1997. 746 [RFC2131] Droms, R., "Dynamic Host Configuration Protocol", RFC 2131, 747 DOI 10.17487/RFC2131, March 1997, . 750 [RFC2629] Rose, M., "Writing I-Ds and RFCs using XML", RFC 2629, DOI 751 10.17487/RFC2629, June 1999, . 754 [RFC6020] Bjorklund, M., Ed., "YANG - A Data Modeling Language for the 755 Network Configuration Protocol (NETCONF)", RFC 6020, DOI 756 10.17487/RFC6020, October 2010, . 759 [RFC6021] Schoenwaelder, J., Ed., "Common YANG Data Types", RFC 6021, 760 DOI 10.17487/RFC6021, October 2010, . 763 [RFC7950] Bjorklund, M., Ed., "The YANG 1.1 Data Modeling Language", RFC 764 7950, DOI 10.17487/RFC7950, September 2016, . 767 Authors' Addresses 768 Bing Liu 769 Huawei Technologies 770 Q14, Huawei Campus, No.156 Beiqing Road 771 Hai-Dian District, Beijing, 100095 772 P.R. China 774 Email: leo.liubing@huawei.com 776 Kunkun Lou 777 Huawei Technologies 778 Huawei Nanjing R&D Center 779 101 Software Avenue, Yuhua District, Nanjing, Jiangsu, 210012 780 P.R. China 782 Email: loukunkun@huawei.com 784 Chin Chen 785 Ericsson (China) Communications Company Ltd. 786 Ericsson Tower, No. 5 Lize East Street, 787 Chaoyang District Beijing 100102, P.R. China 789 Email: chin.chen@ericsson.com