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