idnits 2.17.1 draft-wu-ntp-ntp-cfg-02.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 26 instances of too long lines in the document, the longest one being 68 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 147 has weird spacing: '...ss-mode enu...' == The document doesn't use any RFC 2119 keywords, yet seems to have RFC 2119 boilerplate text. -- The document date (December 26, 2016) is 2668 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) ** Obsolete normative reference: RFC 6536 (Obsoleted by RFC 8341) Summary: 2 errors (**), 0 flaws (~~), 3 warnings (==), 1 comment (--). Run idnits with the --verbose option for more detailed information about the items above. -------------------------------------------------------------------------------- 2 Network Working Group N. Wu 3 Internet-Draft Huawei 4 Intended status: Standards Track A. Kumar S N 5 Expires: June 29, 2017 RtBrick Inc. 6 Y. Zhao 7 Ericsson 8 December 26, 2016 10 A YANG Data Model for NTP 11 draft-wu-ntp-ntp-cfg-02 13 Abstract 15 This document defines a YANG data model for Network Time Protocol 16 implementations. The data model includes configuration data and 17 state data. 19 Requirements Language 21 The key words "MUST", "MUST NOT", "REQUIRED", "SHALL", "SHALL NOT", 22 "SHOULD", "SHOULD NOT", "RECOMMENDED", "MAY", and "OPTIONAL" in this 23 document are to be interpreted as described in RFC 2119 [RFC2119]. 25 Status of This Memo 27 This Internet-Draft is submitted in full conformance with the 28 provisions of BCP 78 and BCP 79. 30 Internet-Drafts are working documents of the Internet Engineering 31 Task Force (IETF). Note that other groups may also distribute 32 working documents as Internet-Drafts. The list of current Internet- 33 Drafts is at http://datatracker.ietf.org/drafts/current/. 35 Internet-Drafts are draft documents valid for a maximum of six months 36 and may be updated, replaced, or obsoleted by other documents at any 37 time. It is inappropriate to use Internet-Drafts as reference 38 material or to cite them other than as "work in progress." 40 This Internet-Draft will expire on June 29, 2017. 42 Copyright Notice 44 Copyright (c) 2016 IETF Trust and the persons identified as the 45 document authors. All rights reserved. 47 This document is subject to BCP 78 and the IETF Trust's Legal 48 Provisions Relating to IETF Documents 49 (http://trustee.ietf.org/license-info) in effect on the date of 50 publication of this document. Please review these documents 51 carefully, as they describe your rights and restrictions with respect 52 to this document. Code Components extracted from this document must 53 include Simplified BSD License text as described in Section 4.e of 54 the Trust Legal Provisions and are provided without warranty as 55 described in the Simplified BSD License. 57 Table of Contents 59 1. Introduction . . . . . . . . . . . . . . . . . . . . . . . . 2 60 1.1. Terminology . . . . . . . . . . . . . . . . . . . . . . . 2 61 1.2. Tree Diagrams . . . . . . . . . . . . . . . . . . . . . . 3 62 2. NTP data model . . . . . . . . . . . . . . . . . . . . . . . 3 63 3. Relationship with NTPv4-MIB . . . . . . . . . . . . . . . . . 6 64 4. Relationship with RFC7317 . . . . . . . . . . . . . . . . . . 7 65 5. NTP YANG Module . . . . . . . . . . . . . . . . . . . . . . . 8 66 6. IANA Considerations . . . . . . . . . . . . . . . . . . . . . 26 67 7. Security Considerations . . . . . . . . . . . . . . . . . . . 27 68 8. Acknowledgments . . . . . . . . . . . . . . . . . . . . . . . 27 69 9. References . . . . . . . . . . . . . . . . . . . . . . . . . 27 70 9.1. Normative References . . . . . . . . . . . . . . . . . . 27 71 9.2. Informative References . . . . . . . . . . . . . . . . . 28 72 Authors' Addresses . . . . . . . . . . . . . . . . . . . . . . . 28 74 1. Introduction 76 This document defines a YANG [RFC6020] data model for Network Time 77 Protocol [RFC5905] implementations. 79 The data model convers configuration of system parameters of NTP, 80 such as access rules, authentication and VRF binding, and also 81 associations of NTP in different modes and parameters of per- 82 interface. It also provides information about running state of NTP 83 implementations. 85 1.1. Terminology 87 The following terms are defined in [RFC6020]: 89 o configuration data 91 o data model 93 o module 95 o state data 96 The terminology for describing YANG data models is found in 97 [RFC6020]. 99 1.2. Tree Diagrams 101 A simplified graphical representation of the data model is used in 102 this document. The meaning of the symbols in these diagrams is as 103 follows: 105 o Brackets "[" and "]" enclose list keys. 107 o Abbreviations before data node names: "rw" means configuration 108 data (read-write), and "ro" means state data (read-only). 110 o Symbols after data node names: "?" means an optional node, "!" 111 means a presence container, and "*" denotes a list and leaf-list. 113 o Parentheses enclose choice and case nodes, and case nodes are also 114 marked with a colon (":"). 116 o Ellipsis ("...") stands for contents of subtrees that are not 117 shown. 119 2. NTP data model 121 This document defines the YANG module "ietf-ntp", which has the 122 following structure: 124 module: ietf-ntp 125 +--rw ntp-cfg! 126 | +--rw ntp-enabled? boolean 127 | +--rw port? uint16 128 | +--rw refclock-master 129 | | +--rw master? boolean 130 | | +--rw master-stratum? ntp-stratum 131 | +--rw authentication! 132 | | +--rw auth-enabled? boolean 133 | | +--rw trusted-keys* [key-id] 134 | | | +--rw key-id leafref 135 | | +--rw authentication-keys* [key-id] 136 | | | +--rw key-id uint32 137 | | | +--rw algorithm? enumeration 138 | | | +--rw password? ianach:crypt-hash 139 | | +--rw autokey 140 | | +--rw automax? uint8 141 | | +--rw crypto? 142 | | | +--rw digest? enumeration 143 | | +--rw ident? string 144 | | +--rw revoke? uint8 145 | +--rw access-rules 146 | | +--rw access-rule* [access-mode] 147 | | +--rw access-mode enumeration 148 | | +--rw acl-number 149 | | +--rw (acl-type)? 150 | | +--:(ipv4) 151 | | | +--rw acl-number-ipv4? uint16 152 | | +--:(ipv6) 153 | | +--rw acl-number-ipv6? uint16 154 | +--rw association* [address vrf] 155 | | +--rw version? ntp-version 156 | | +--rw address inet:host 157 | | +--rw association-type? enumeration 158 | | +--rw authentication 159 | | | +--rw (authentication-type)? 160 | | | +--:(symmetric-key) 161 | | | | +--rw key-id? leafref 162 | | | +--:(auto-key) 163 | | | | +--rw auto-key? empty 164 | | +--rw minpoll? ntp-minpoll 165 | | +--rw maxpoll? ntp-maxpoll 166 | | +--rw prefer? boolean 167 | | +--rw burst? boolean 168 | | +--rw iburst? boolean 169 | | +--rw vrf string 170 | | +--rw source? leafref 171 | +--rw ntp-interfaces 172 | +--rw ntp-interface* [ntp-ifname] 173 | +--rw ntp-ifname leafref 174 | +--rw broadcast-multicast-server 175 | | +--rw address? inet:ip-address 176 | | +--rw ttl? uint8 177 | | +--rw version? ntp-version 178 | | +--rw authentication 179 | | | +--rw (authentication-type)? 180 | | | +--:(symmetric-key) 181 | | | | +--rw key-id? leafref 182 | | | +--:(auto-key) 183 | | | | +--rw auto-key? empty 184 | | +--rw minpoll? ntp-minpoll 185 | +--rw broadcast-client 186 | | +--rw broadcast-client-enabled? boolean 187 | +--rw multicast-client 188 | | +--rw multicast-client-address? union 189 | +--rw manycast-server 190 | | +--rw manycast-server-address? inet:ip-address 191 | +--rw manycast-client 192 | | +--rw address? inet:ip-address 193 | | +--rw version? ntp-version 194 | | +--rw authentication 195 | | | +--rw (authentication-type)? 196 | | | +--:(symmetric-key) 197 | | | | +--rw key-id? leafref 198 | | | +--:(auto-key) 199 | | | | +--rw auto-key? empty 200 | | +--rw ttl? uint8 201 | | +--rw minpoll? ntp-minpoll 202 | | +--rw maxpoll? ntp-maxpoll 203 | | +--rw minclock? uint8 204 | | +--rw maxclock? uint8 205 | | +--rw beacon? uint8 206 +--ro ntp-state 207 +--ro system-status 208 | +--ro clock-state? enumeration 209 | +--ro clock-stratum? ntp-stratum 210 | +--ro clock-refid? union 211 | +--ro nominal-freq? decimal64 212 | +--ro actual-freq? decimal64 213 | +--ro clock-precision? uint8 214 | +--ro clock-offset? decimal64 215 | +--ro root-delay? decimal64 216 | +--ro root-dispersion? decimal64 217 | +--ro peer-dispersion? decimal64 218 | +--ro reference-time? string 219 | +--ro sync-state? enumeration 220 +--ro associations-status 221 | +--ro association-status* [association-source] 222 | +--ro association-source union 223 | +--ro association-stratum? ntp-stratum 224 | +--ro association-refid? union 225 | +--ro association-reach? uint8 226 | +--ro association-unreach? uint8 227 | +--ro association-poll? uint8 228 | +--ro association-now? uint32 229 | +--ro association-offset? decimal64 230 | +--ro association-delay? decimal64 231 | +--ro association-dispersion? decimal64 232 | +--ro association-sent? uint32 233 | +--ro association-sent-fail? uint32 234 | +--ro association-received? uint32 235 | +--ro association-dropped? uint32 237 This data model defines two primary containers, one for NTP 238 configuration and the other is for NTP running state. The NTP 239 configuration container includes data nodes for access rules, 240 authentication, associations and interfaces. In the NTP running 241 state container, there are data nodes for system status and 242 associations. 244 3. Relationship with NTPv4-MIB 246 If the device implements the NTPv4-MIB [RFC5907], data nodes in 247 container ntp-cfg and ntp-state from YANG module can be mapped to 248 table entries in NTPv4-MIB. 250 The following tables list the YANG data nodes with corresponding 251 objects in the NTPv4-MIB. 253 +--------------------------------+----------------------------------+ 254 | YANG data nodes in /ntp-cfg/ | NTPv4-MIB objects | 255 +--------------------------------+----------------------------------| 256 | ntp-enabled | ntpEntStatusCurrentMode | 257 +-------------------------------------------------------------------+ 259 +-------------------------------------+-----------------------------+ 260 | YANG data nodes in | NTPv4-MIB objects | 261 | /ntp-cfg/associations | | 262 +-------------------------------------+-----------------------------+ 263 | address | ntpAssocAddressType | 264 | | ntpAssocAddress | 265 +-------------------------------------------------------------------+ 266 YANG NTP Configuration Data Nodes and Related NTPv4-MIB Objects 268 +--------------------------------+----------------------------------+ 269 | YANG data nodes in | NTPv4-MIB objects | 270 | /ntp-state/system-status | | 271 +--------------------------------+----------------------------------+ 272 | clock-state | ntpEntStatusCurrentMode | 273 | clock-stratum | ntpEntStatusStratum | 274 | clock-refid | ntpEntStatusActiveRefSourceId | 275 | | ntpEntStatusActiveRefSourceName | 276 | clock-precision | ntpEntTimePrecision | 277 | clock-offset | ntpEntStatusActiveOffset | 278 | root-dispersion | ntpEntStatusDispersion | 279 +-------------------------------------------------------------------+ 281 +--------------------------------+----------------------------------+ 282 | YANG data nodes in | NTPv4-MIB objects | 283 | /ntp-state/associations-status/| | 284 | association-status/ | | 285 +--------------------------------+----------------------------------+ 286 | association-source | ntpAssocAddressType | 287 | | ntpAssocAddress | 288 | association-stratum | ntpAssocStratum | 289 | association-refid | ntpAssocRefId | 290 | association-offset | ntpAssocOffset | 291 | association-delay | ntpAssocStatusDelay | 292 | association-dispersion | ntpAssocStatusDispersion | 293 | association-sent | ntpAssocStatOutPkts | 294 | association-received | ntpAssocStatInPkts | 295 | association-dropped | ntpAssocStatProtocolError | 296 +-------------------------------------------------------------------+ 298 YANG NTP State Data Nodes and Related NTPv4-MIB Objects 300 4. Relationship with RFC7317 302 This section describes the relationship with NTP definition in 303 Section 3.2 System Time Management of [RFC7317] . 305 +-------------------------------------+-------------------------------+ 306 | YANG data nodes in /ntp-cfg/ | YANG data nodes in /system/ntp| 307 +--------------------------------------------------+-------------------------------+ 308 | ntp-enabled | enabled | 309 | associations/association | server | 310 | | server/name | 311 | associations/association/address | server/transport/udp/address | 312 | ntp-enabled/port | server/transport/udp/port | 313 | associations/association-type | server/association-type | 314 | ntp-interfaces/broadcast-multicast-server | | 315 | ntp-interfaces/broadcast-client | | 316 | ntp-interfaces/multicast-client | | 317 | ntp-interfaces/manycast-server | | 318 | ntp-interfaces/manycast-client | | 319 | associations/association/iburst | server/iburst | 320 | associations/association/prefer | server/prefer | 321 +--------------------------------------------------|-------------------------------+ 322 YANG NTP Configuration Data Nodes and counterparts in RFC7317 Objects 324 5. NTP YANG Module 326 // file "ietf-ntp@2016-11-01.yang" 327 module ietf-ntp { 329 namespace "urn:ietf:params:xml:ns:yang:ietf-ntp"; 331 prefix "ntp"; 333 import ietf-inet-types { 334 prefix "inet"; 335 } 337 import ietf-interfaces { 338 prefix "if"; 339 } 341 import iana-crypt-hash { 342 prefix ianach; 343 } 345 organization 346 "IETF NTP (Network Time Protocol) Working Group"; 348 contact 349 "WG Web: 350 WG List: 354 Editor: Eric Wu 355 356 Editor: Anil Kumar S N 357 358 Editor: Yi Zhao 359 "; 360 description 361 "This YANG module defines essential components for the 362 management of a routing subsystem. 364 Copyright (c) 2014 IETF Trust and the persons identified 365 as authors of the code. All rights reserved. 367 Redistribution and use in source and binary forms, 368 with or without modification, is permitted pursuant to, 369 and subject to the license terms contained in, the 370 Simplified BSD License set forth in Section 4.c of the 371 IETF Trust's Legal Provisions Relating to IETF Documents 372 (http://trustee.ietf.org/license-info). 374 This version of this YANG module is part of RFC XXXX; 375 see the RFC itself for full legal notices."; 377 revision "2016-11-01" { 378 description "Second revision " + 379 " - changed trusted-keys to list " + 380 " - changed password to type ianach:crypt-hash " + 381 " - rearranged peer and server " + 382 " - added association type pool " + 383 " - mergerd multicast server and broadcast server " + 384 " - added auto-key authentication type " + 385 " - added container manycast server" + 386 " - added container manycast client" + 387 " - added a new leaf association-unreach"; 388 reference ""; 389 } 391 revision 2015-09-27 { 392 description 393 "Updated revision."; 394 reference 395 "RFC XXXX: A YANG Data Model for NTP Management"; 396 } 398 /* Typedef Definitions */ 399 typedef ntp-stratum { 400 type uint8 { 401 range "1..16"; 402 } 403 description 404 "The level of each server in the hierarchy is defined by a 405 stratum number. Primary servers are assigned stratum one; 406 secondary servers at each lower level are assigned stratum 407 numbers one greater than the preceding level"; 408 } 410 typedef ntp-version { 411 type uint8 { 412 range "1..4"; 413 } 414 default "3"; 415 description 416 "The current NTP version supported by corresponding 417 association."; 418 } 420 typedef ntp-minpoll { 421 type uint8 { 422 range "4..17"; 423 } 424 default "6"; 425 description 426 "The minimum poll exponent for this NTP association."; 427 } 429 typedef ntp-maxpoll { 430 type uint8 { 431 range "4..17"; 432 } 433 default "10"; 434 description 435 "The maximul poll exponent for this NTP association."; 436 } 438 typedef multicast-client-v4address { 439 type inet:ipv4-address; 440 default "224.0.1.1"; 441 description 442 "The IPv4 address for NTP multicast client."; 443 } 444 typedef multicast-client-v6address { 445 type inet:ipv6-address; 446 default "FF0E::0101"; 447 description 448 "The IPv6 address for NTP multicast client."; 449 } 451 /* Groupings */ 452 grouping authentication-key { 453 description 454 "To define an authentication key for a Network Time Protocol 455 (NTP) time source."; 456 leaf key-id { 457 type uint32 { 458 range "1..max"; 459 } 460 description 461 "Authentication key identifier."; 462 } 463 leaf algorithm { 464 type enumeration { 465 enum md5 { 466 description 467 "Message Digest 5 (MD5) algorithm."; 468 } 469 enum hmac-sha256 { 470 description 471 "Secure Hash Algorithm 256 algorithm."; 472 } 473 } 474 description 475 "Authentication algorithm."; 476 } 477 leaf password { 478 type ianach:crypt-hash; 479 description "Clear or encrypted mode for password text."; 480 } 481 } 483 grouping authentication-type-param { 484 description 485 "Authentication type."; 486 choice authentication-type { 487 description 488 "Type of authentication."; 489 case symmetric-key { 490 leaf key-id { 491 type leafref { 492 path "/ntp:ntp-cfg/ntp:authentication/" 493 + "ntp:authentication-keys/ntp:key-id"; 494 } 495 description 496 "Authentication key id referenced in this association."; 497 } 498 } 499 case auto-key { 500 leaf auto-key { 501 type empty; 502 description 503 "Autokey authentication."; 504 } 505 } 506 } 507 } 508 /* Configuration data nodes */ 509 container ntp-cfg { 510 presence 511 "Enables NTP unless the 'ntp-enabled' leaf 512 (which defaults to 'true') is set to 'false'"; 513 description 514 "Configuration parameters for NTP."; 515 leaf ntp-enabled { 516 type boolean; 517 default true; 518 description 519 "Controls whether NTP is enabled or disabled 520 on this device."; 521 } 523 leaf port { 524 type uint16 { 525 range "123 | 1025..max"; 526 } 527 default "123"; 528 description 529 "Specify the port used to send NTP packets."; 530 } 532 container refclock-master { 533 description 534 "Configuration for reference clock."; 535 leaf master { 536 type boolean; 537 default false; 538 description 539 "Use its own NTP master clock to synchronize with peers 540 when true."; 541 } 542 leaf master-stratum { 543 type ntp-stratum; 544 default "16"; 545 description 546 "Use its own NTP master clock to synchronize with peers 547 when master is true."; 548 } 549 } 550 container authentication { 551 presence 552 "Enables NTP authentication when the 'auth-enabled' 553 leaf is set to 'true'."; 554 description 555 "Configuration of authentication."; 556 leaf auth-enabled { 557 type boolean; 558 default false; 559 description 560 "Controls whether NTP authentication is enabled 561 or disabled on this device."; 562 } 563 list trusted-keys { 564 key "key-id"; 565 description 566 "List of keys trusted by NTP."; 567 leaf key-id { 568 type leafref { 569 path "/ntp:ntp-cfg/ntp:authentication/" 570 + "ntp:authentication-keys/ntp:key-id"; 571 } 572 description 573 "The key trusted by NTP."; 574 } 575 } 576 list authentication-keys { 577 key "key-id"; 578 uses authentication-key; 579 description 580 "List of authentication key."; 581 } 582 container autokey { 583 description 584 "Configuration parameters for Autokey."; 585 leaf automax { 586 type uint8; 587 default "12"; 588 description 589 "The interval between regenerations of the session key list used with the Autokey protocol, as a power of 2 in seconds."; 590 } 591 container crypto { 592 description 593 "Configuration parameters for Autokey public key cryptography"; 594 leaf digest{ 595 type enumeration { 596 enum md2 { 597 description 598 "Message Digest 2 (MD2) algorithm."; 599 } 600 enum md4 { 601 description 602 "Message Digest 4 (MD4) algorithm."; 603 } 604 enum md5 { 605 description 606 "Message Digest 5 (MD5) algorithm."; 607 } 608 enum mdc2 { 609 description 610 "Modification Detection Code 2(MDC2) algorithm."; 611 } 612 enum ripemd160 { 613 description 614 "160-bit version of RACE Integrity Primitives Evaluation Message Digest (RIPEMD-160) algorithm."; 615 } 616 enum sha { 617 description 618 "Secure Hash Algorithm (SHA) algorithm."; 619 } 620 enum sha1 { 621 description 622 "Secure Hash Algorithm (SHA1) algorithm."; 623 } 624 } 625 default "md5"; 626 description 627 "Message digest algorithm."; 628 } 629 } 630 } 631 } 633 container access-rules { 634 description 635 "Configuration of access rules."; 636 list access-rule { 637 key "access-mode"; 638 description 639 "List of access rules."; 640 leaf access-mode { 641 type enumeration { 642 enum peer { 643 description 644 "Sets the fully access authority. Both time 645 request and control query can be performed 646 on the local NTP service, and the local clock 647 can be synchronized to the remote server."; 648 } 649 enum server { 650 description 651 "Enables the server access and query. 652 Both time requests and control query can be 653 performed on the local NTP service, but the 654 local clock cannot be synchronized to the 655 remote server."; 656 } 657 enum synchronization { 658 description 659 "Enables the server to access. 660 Only time request can be performed on the 661 local NTP service."; 662 } 663 enum query { 664 description 665 "Sets the maximum access limitation. 666 Control query can be performed only on the 667 local NTP service."; 668 } 669 } 670 description 671 "NTP access mode."; 672 } 673 container acl-number { 674 description 675 "Configuration of acl numbers."; 676 choice acl-type { 677 description 678 "Type of acl."; 679 case ipv4 { 680 leaf acl-number-ipv4 { 681 type uint16; 682 description "IPv4 acl number."; 683 } 685 } 686 case ipv6 { 687 leaf acl-number-ipv6 { 688 type uint16; 689 description "IPv6 acl number."; 690 } 691 } 692 } 693 } 694 } 695 } 697 list associations { 698 key "address vrf"; 699 description 700 "list of association."; 701 leaf version { 702 type ntp-version; 703 description 704 "NTP version."; 705 } 706 leaf address { 707 type inet:host; 708 description 709 "The address of this association."; 710 } 711 leaf association-type { 712 type enumeration { 713 enum server { 714 description 715 "Use client association mode. This device 716 will not provide synchronization to the 717 configured NTP server."; 718 } 719 enum peer { 720 description 721 "Use symmetric active association mode. 722 This device may provide synchronization 723 to the configured NTP server."; 724 } 725 enum pool { 726 description 727 "Use client association mode with one or 728 more of the NTP servers found by DNS 729 resolution of the domain name given by 730 the 'address' leaf. This device will not 731 provide synchronization to the servers."; 732 } 734 } 735 default server; 736 description 737 "The desired association type for this NTP server."; 738 } 739 container authentication{ 740 description 741 "Authentication type."; 742 uses authentication-type-param; 743 } 744 leaf minpoll { 745 type ntp-minpoll; 746 description 747 "The minimum poll interval used in this association."; 748 } 749 leaf maxpoll { 750 type ntp-maxpoll; 751 description 752 "The maximul poll interval used in this association."; 753 } 754 leaf prefer { 755 type boolean; 756 default "false"; 757 description 758 "Whether this association is preferred."; 759 } 760 leaf burst { 761 type boolean; 762 default "false"; 763 description 764 "Sends a series of packets instead of a single packet 765 within each synchronization interval to achieve faster 766 synchronization."; 767 } 768 leaf iburst { 769 type boolean; 770 default "false"; 771 description 772 "Sends a series of packets instead of a single packet 773 within the initial synchronization interval to achieve 774 faster initial synchronization."; 775 } 776 leaf vrf { 777 type string; 778 description 779 "The VRF instance this association binded to."; 780 } 781 leaf source { 782 type leafref { 783 path "/if:interfaces/if:interface/if:name"; 784 } 785 description 786 "The interface whose ip address this association used 787 as source address."; 788 } 789 } 791 container ntp-interfaces { 792 description 793 "Configuration parameters for NTP interfaces."; 794 list ntp-interface { 795 key "ntp-ifname"; 796 description 797 "List of interfaces."; 798 leaf ntp-ifname { 799 type leafref { 800 path "/if:interfaces/if:interface/if:name"; 801 } 802 description 803 "The interface name."; 804 } 806 container broadcast-multicast-server { 807 description 808 "Configuration of broadcast or multicast server."; 809 leaf address { 810 type inet:ip-address; 811 description 812 "The IP address to send NTP broadcast or multicast packets."; 813 } 814 leaf ttl { 815 type uint8; 816 description 817 "Specifies the time to live (TTL) of a broadcast or multicast 818 packet."; 819 } 820 leaf version { 821 type ntp-version; 822 description 823 "Specifies the version a multicast or broadcast packet."; 824 } 825 container authentication{ 826 description 827 "Authentication type."; 828 uses authentication-type-param; 829 } 830 leaf minpoll { 831 type ntp-minpoll; 832 description 833 "The minimum poll interval for NTP messages."; 834 } 835 } 836 container broadcast-client { 837 description 838 "Configuration of broadcast-client."; 839 leaf broadcast-client-enabled { 840 type boolean; 841 description 842 "Allows a device to receive Network Time Protocol 843 (NTP) broadcast packets on an interface."; 844 } 845 } 846 container multicast-client { 847 description 848 "Configuration of multicast-client."; 849 leaf multicast-client-address { 850 type union { 851 type multicast-client-v4address; 852 type multicast-client-v6address; 853 } 854 description 855 "The IP address of the multicast group to join."; 856 } 857 } 858 container manycast-server { 859 description 860 "Configuration of manycast server."; 861 leaf address { 862 type inet:ip-address; 863 description 864 "The multicast group IP address to receive manycast client messages ."; 865 } 866 } 867 container manycast-client { 868 description 869 "Configuration of manycast-client."; 870 leaf address { 871 type inet:ip-address; 872 description 873 "The group IP address that the manycast client broadcasts the request message to."; 874 } 875 leaf version { 876 type ntp-version; 877 description 878 "NTP version."; 879 } 880 container authentication{ 881 description 882 "Authentication type."; 883 uses authentication-type-param; 884 } 885 leaf ttl { 886 type uint8; 887 description 888 "Specifies the maximum time to live (TTL) for the expanding ring search."; 889 } 890 leaf minpoll { 891 type ntp-minpoll; 892 description 893 "The minimum poll interval for NTP messages."; 894 } 895 leaf maxpoll { 896 type ntp-maxpoll; 897 description 898 "The maximum poll interval for NTP messages."; 899 } 900 leaf minclock { 901 type uint8; 902 description 903 "The minimum manycast survivors in this association."; 904 } 905 leaf maxclock { 906 type uint8; 907 description 908 "The maximum manycast candidates in this association."; 909 } 910 leaf beacon { 911 type uint8; 912 description 913 "The maximum interval between beacons in this association."; 914 } 915 } 916 } 917 } 918 } 920 /* Operational state data */ 921 container ntp-state { 922 config "false"; 923 description 924 "Operational state of the NTP."; 926 container system-status { 927 description 928 "System status of NTP."; 929 leaf clock-state { 930 type enumeration { 931 enum synchronized { 932 description 933 "Indicates that the local clock has been 934 synchronized with an NTP server or 935 the reference clock."; 936 } 937 enum unsynchronized { 938 description 939 "Indicates that the local clock has not been 940 synchronized with any NTP server."; 941 } 942 } 943 description "Indicates the state of system clock."; 944 } 945 leaf clock-stratum { 946 type ntp-stratum; 947 description 948 "Indicates the stratum of the reference clock."; 949 } 950 leaf clock-refid { 951 type union { 952 type inet:ipv4-address; 953 type binary { 954 length "4"; 955 } 956 type string { 957 length "4"; 958 } 959 } 960 description 961 "IPv4 address or first 32 bits of the MD5 hash of 962 the IPv6 address or reference clock of the peer to 963 which clock is synchronized."; 964 } 965 leaf nominal-freq { 966 type decimal64 { 967 fraction-digits 4; 968 } 969 description 970 "Indicates the nominal frequency of the 971 local clock, in Hz."; 972 } 973 leaf actual-freq { 974 type decimal64 { 975 fraction-digits 4; 976 } 977 description 978 "Indicates the actual frequency of the 979 local clock, in Hz."; 980 } 981 leaf clock-precision { 982 type uint8; 983 description 984 "Precision of the clock of this system 985 in Hz.(prec=2^(-n))"; 986 } 987 leaf clock-offset { 988 type decimal64 { 989 fraction-digits 4; 990 } 991 description 992 "Offset of clock to synchronized peer, 993 in milliseconds."; 994 } 995 leaf root-delay { 996 type decimal64 { 997 fraction-digits 2; 998 } 999 description 1000 "Total delay along path to root clock, 1001 in milliseconds."; 1002 } 1003 leaf root-dispersion { 1004 type decimal64 { 1005 fraction-digits 2; 1006 } 1007 description 1008 "Indicates the dispersion between the local clock 1009 and the master reference clock, in milliseconds."; 1010 } 1011 leaf peer-dispersion { 1012 type decimal64 { 1013 fraction-digits 2; 1014 } 1015 description 1016 "Indicates the dispersion between the local clock 1017 and the peer clock, in milliseconds."; 1018 } 1019 leaf reference-time { 1020 type string; 1021 description 1022 "Indicates reference timestamp."; 1023 } 1024 leaf sync-state { 1025 type enumeration { 1026 enum clock-not-set { 1027 description 1028 "Indicates the clock is not updated."; 1029 } 1030 enum freq-set-by-cfg { 1031 description 1032 "Indicates the clock frequency is set by 1033 NTP configuration."; 1034 } 1035 enum clock-set { 1036 description 1037 "Indicates the clock is set."; 1038 } 1039 enum freq-not-determined { 1040 description 1041 "Indicates the clock is set but the frequency 1042 is not determined."; 1043 } 1044 enum clock-synchronized { 1045 description 1046 "Indicates that the clock is synchronized."; 1047 } 1048 enum spike { 1049 description 1050 "Indicates a time difference of more than 128 1051 milliseconds is detected between NTP server 1052 and client clock. The clock change will take 1053 effect in XXX seconds."; 1054 } 1055 } 1056 description 1057 "Indicates the synchronization status of 1058 the local clock."; 1059 } 1060 } 1061 container associations-status { 1062 description 1063 "System status of NTP."; 1064 list association-status { 1065 key "association-source"; 1066 description 1067 "List of association status."; 1068 leaf association-source { 1069 type union { 1070 type inet:ipv4-address; 1071 type inet:ipv6-address; 1072 } 1073 description 1074 "IPv4 or IPv6 address of the peer. If a 1075 nondefault VRF is configured for the peer, 1076 the VRF follows the address."; 1077 } 1078 leaf association-stratum { 1079 type ntp-stratum; 1080 description 1081 "Indicates the stratum of the reference clock."; 1082 } 1083 leaf association-refid { 1084 type union { 1085 type inet:ipv4-address; 1086 type binary { 1087 length "4"; 1088 } 1089 type string { 1090 length "4"; 1091 } 1092 } 1093 description 1094 "Reference clock type or address for the peer."; 1095 } 1096 leaf association-reach { 1097 type uint8; 1098 description 1099 "Indicates the reachability of the configured 1100 server or peer."; 1101 } 1102 leaf association-unreach { 1103 type uint8; 1104 description 1105 "Indicates the unreachability of the configured 1106 server or peer."; 1107 } 1108 leaf association-poll { 1109 type uint8; 1110 description 1111 "Indicates the polling interval for current, 1112 in seconds."; 1113 } 1114 leaf association-now { 1115 type uint32; 1116 description 1117 "Indicates the time since the NTP packet was 1118 not received or last synchronized, in seconds."; 1119 } 1120 leaf association-offset { 1121 type decimal64 { 1122 fraction-digits 4; 1123 } 1124 description 1125 "Indicates the offset between the local clock 1126 and the superior reference clock."; 1127 } 1128 leaf association-delay { 1129 type decimal64 { 1130 fraction-digits 2; 1131 } 1132 description 1133 "Indicates the delay between the local clock 1134 and the superior reference clock."; 1135 } 1136 leaf association-dispersion { 1137 type decimal64 { 1138 fraction-digits 2; 1139 } 1140 description 1141 "Indicates the dispersion between the local 1142 clock and the superior reference clock."; 1143 } 1144 leaf association-sent { 1145 type uint32; 1146 description 1147 "Indicates the total number of packets this 1148 association sent."; 1149 } 1150 leaf association-sent-fail { 1151 type uint32; 1152 description 1153 "Indicates the number of times packet sending 1154 failed by this association."; 1155 } 1156 leaf association-received { 1157 type uint32; 1158 description 1159 "Indicates the total number of packets 1160 this association received."; 1161 } 1162 leaf association-dropped { 1163 type uint32; 1164 description 1165 "Indicates the number of packets 1166 this association dropped."; 1167 } 1168 } 1169 } 1171 container ntp-statistics { 1172 description 1173 "Packet statistics of NTP."; 1174 leaf packet-sent { 1175 type uint32; 1176 description 1177 "Indicates the total number of packets sent."; 1178 } 1179 leaf packet-sent-fail { 1180 type uint32; 1181 description 1182 "Indicates the number of times packet 1183 sending failed."; 1184 } 1185 leaf packet-received { 1186 type uint32; 1187 description 1188 "Indicates the total number of packets received."; 1189 } 1190 leaf packet-dropped { 1191 type uint32; 1192 description 1193 "Indicates the number of packets dropped."; 1194 } 1195 } 1196 } 1197 } 1198 // 1200 6. IANA Considerations 1202 This document registers a URI in the "IETF XML Registry" [RFC3688]. 1203 Following the format in RFC 3688, the following registration has been 1204 made. 1206 URI: urn:ietf:params:xml:ns:yang:ietf-ntp 1208 Registrant Contact: The NETMOD WG of the IETF. 1210 XML: N/A; the requested URI is an XML namespace. 1212 This document registers a YANG module in the "YANG Module Names" 1213 registry [RFC6020]. 1215 Name: ietf-ntp 1217 Namespace: urn:ietf:params:xml:ns:yang:ietf-ntp 1219 Prefix: ntp 1221 Reference: RFC XXXX 1223 7. Security Considerations 1225 The YANG module defined in this memo is designed to be accessed via 1226 the NETCONF protocol [RFC6241]. The lowest NETCONF layer is the 1227 secure transport layer and the mandatory-to-implement secure 1228 transport is SSH [RFC6242]. The NETCONF access control model 1229 [RFC6536] provides the means to restrict access for particular 1230 NETCONF users to a pre-configured subset of all available NETCONF 1231 protocol operations and content. 1233 There are a number of data nodes defined in the YANG module which are 1234 writable/creatable/deletable (i.e., config true, which is the 1235 default). These data nodes may be considered sensitive or vulnerable 1236 in some network environments. Write operations (e.g., ) 1237 to these data nodes without proper protection can have a negative 1238 effect on network operations. 1240 8. Acknowledgments 1242 The authors would like to express their thanks to Sladjana Zoric, 1243 Danny Mayer, Harlan Stenn, Ulrich Windl and Miroslav Lichvar for 1244 their review and suggestions. 1246 9. References 1248 9.1. Normative References 1250 [RFC3688] Mealling, M., "The IETF XML Registry", BCP 81, RFC 3688, 1251 DOI 10.17487/RFC3688, January 2004, 1252 . 1254 [RFC5905] Mills, D., Martin, J., Ed., Burbank, J., and W. Kasch, 1255 "Network Time Protocol Version 4: Protocol and Algorithms 1256 Specification", RFC 5905, DOI 10.17487/RFC5905, June 2010, 1257 . 1259 [RFC5907] Gerstung, H., Elliott, C., and B. Haberman, Ed., 1260 "Definitions of Managed Objects for Network Time Protocol 1261 Version 4 (NTPv4)", RFC 5907, DOI 10.17487/RFC5907, June 1262 2010, . 1264 [RFC6020] Bjorklund, M., Ed., "YANG - A Data Modeling Language for 1265 the Network Configuration Protocol (NETCONF)", RFC 6020, 1266 DOI 10.17487/RFC6020, October 2010, 1267 . 1269 [RFC6241] Enns, R., Ed., Bjorklund, M., Ed., Schoenwaelder, J., Ed., 1270 and A. Bierman, Ed., "Network Configuration Protocol 1271 (NETCONF)", RFC 6241, DOI 10.17487/RFC6241, June 2011, 1272 . 1274 [RFC6242] Wasserman, M., "Using the NETCONF Protocol over Secure 1275 Shell (SSH)", RFC 6242, DOI 10.17487/RFC6242, June 2011, 1276 . 1278 [RFC6536] Bierman, A. and M. Bjorklund, "Network Configuration 1279 Protocol (NETCONF) Access Control Model", RFC 6536, 1280 DOI 10.17487/RFC6536, March 2012, 1281 . 1283 9.2. Informative References 1285 [RFC2119] Bradner, S., "Key words for use in RFCs to Indicate 1286 Requirement Levels", BCP 14, RFC 2119, 1287 DOI 10.17487/RFC2119, March 1997, 1288 . 1290 [RFC7317] Bierman, A. and M. Bjorklund, "A YANG Data Model for 1291 System Management", RFC 7317, DOI 10.17487/RFC7317, August 1292 2014, . 1294 Authors' Addresses 1296 Nan Wu 1297 Huawei 1298 Huawei Bld., No.156 Beiqing Rd. 1299 Beijing 100095 1300 China 1302 Email: eric.wu@huawei.com 1304 Anil Kumar S N 1305 RtBrick Inc. 1306 Bangalore, Kanataka 560037 1307 India 1309 Email: anil.ietf@gmail.com 1310 Yi Zhao 1311 Ericsson 1312 China Digital Kingdom Bld., No.1 WangJing North Rd. 1313 Beijing 100102 1314 China 1316 Email: yi.z.zhao@ericsson.com