Cisco-IOS-XE-ntp-oper

This module contains a collection of YANG definitions for NTP operational data. Copyright (c) 2017-2019 by Cisco Systems, Inc. A...

  • Version: 2019-05-01

    Cisco-IOS-XE-ntp-oper@2019-05-01


    
      module Cisco-IOS-XE-ntp-oper {
    
        yang-version 1;
    
        namespace
          "http://cisco.com/ns/yang/Cisco-IOS-XE-ntp-oper";
    
        prefix ntp-ios-xe-oper;
    
        import ietf-inet-types {
          prefix inet;
        }
        import ietf-yang-types {
          prefix yang;
        }
        import cisco-semver {
          prefix cisco-semver;
        }
    
        organization "Cisco Systems, Inc.";
    
        contact
          "Cisco Systems, Inc.
         Customer Service
    
         Postal: 170 W Tasman Drive
         San Jose, CA 95134
    
         Tel: +1 1800 553-NETS
    
         E-mail: cs-yang@cisco.com";
    
        description
          "This module contains a collection of YANG definitions
         for NTP operational data.
         Copyright (c) 2017-2019 by Cisco Systems, Inc.
         All rights reserved.";
    
        revision "2019-05-01" {
          description "Added semantic version";
          reference
            "1.3.0";
    
        }
    
        revision "2018-10-29" {
          description
            "Cleaned up spelling errors in descriptions.";
          reference
            "1.2.0";
    
        }
    
        revision "2018-01-16" {
          description
            "Server address, NTP selection status, NTP peer events. NTP number of events, NTP authentication status.";
          reference
            "1.1.0";
    
        }
    
        revision "2017-11-01" {
          description "Initial revision";
          reference
            "1.0.0";
    
        }
    
        cisco-semver:module-version "1.3.0";
        cisco-semver:module-version "1.2.0";
        cisco-semver:module-version "1.1.0";
        cisco-semver:module-version "1.0.0";
    
        typedef ref-clock-source-type {
          type enumeration {
            enum "ntp-ref-goes" {
              value 0;
              description
                "Geosynchronous Orbit Environment Satellite";
            }
            enum "ntp-ref-gps" {
              value 1;
              description
                "Global Position System";
            }
            enum "ntp-ref-gal" {
              value 2;
              description
                "Galileo Positioning System";
            }
            enum "ntp-ref-pps" {
              value 3;
              description
                "Generic pulse-per-second";
            }
            enum "ntp-ref-irig" {
              value 4;
              description
                "Inter-Range Instrumentation Group";
            }
            enum "ntp-ref-wwvb" {
              value 5;
              description
                "LF Radio WWVB Ft. Collins";
            }
            enum "ntp-ref-dcf" {
              value 6;
              description
                "LF Radio DCF77 Mainflingen";
            }
            enum "ntp-ref-hbg" {
              value 7;
              description
                "LF Radio HBG Prangins";
            }
            enum "ntp-ref-msf" {
              value 8;
              description "LF Radio MSF Anthorn";
            }
            enum "ntp-ref-jjy" {
              value 9;
              description
                "LF Radio JJY Fukushima";
            }
            enum "ntp-ref-lorc" {
              value 10;
              description
                "MF Radio LORAN C station";
            }
            enum "ntp-ref-tdf" {
              value 11;
              description "MF Radio Allouis";
            }
            enum "ntp-ref-chu" {
              value 12;
              description "HF Radio CHU Ottawa";
            }
            enum "ntp-ref-wwv" {
              value 13;
              description
                "HF Radio WWV Ft. Collins";
            }
            enum "ntp-ref-wwvh" {
              value 14;
              description "HF Radio WWVH Kauai";
            }
            enum "ntp-ref-nist" {
              value 15;
              description "NIST telephone modem";
            }
            enum "ntp-ref-acts" {
              value 16;
              description "NIST telephone modem";
            }
            enum "ntp-ref-usno" {
              value 17;
              description "USNO telephone modem";
            }
            enum "ntp-ref-ptb" {
              value 18;
              description
                "European telephone modem";
            }
          }
          description
            "Clock source type for NTP";
        }
    
        typedef kiss-code-type {
          type enumeration {
            enum "ntp-ref-acst" {
              value 0;
              description
                "The association belongs to a unicast server";
            }
            enum "ntp-ref-auth" {
              value 1;
              description
                "Server authentication failed";
            }
            enum "ntp-ref-auto" {
              value 2;
              description
                "Autokey sequence failed";
            }
            enum "ntp-ref-bcst" {
              value 3;
              description
                "The association belongs to a broadcast server";
            }
            enum "ntp-ref-cryp" {
              value 4;
              description
                "Cryptographic authentication or identification failed";
            }
            enum "ntp-ref-deny" {
              value 5;
              description
                "Access denied by remote server";
            }
            enum "ntp-ref-drop" {
              value 6;
              description
                "Lost peer in symmetric mode";
            }
            enum "ntp-ref-rstr" {
              value 7;
              description
                "Access denied due to local policy";
            }
            enum "ntp-ref-init" {
              value 8;
              description
                "The association has not synchronized for the first time";
            }
            enum "ntp-ref-mcst" {
              value 9;
              description
                "The association belongs to a dynamically discovered server";
            }
            enum "ntp-ref-nkey" {
              value 10;
              description
                "No key found. Either the key was never installed or not trusted";
            }
            enum "ntp-ref-rate" {
              value 11;
              description
                "The server has temporarily denied access because
               the client exceeded the rate threshold";
            }
            enum "ntp-ref-rmot" {
              value 12;
              description
                "Alteration of association from a remote host running ntpdc";
            }
            enum "ntp-ref-step" {
              value 13;
              description
                "STEP means the offset is less than the panic threshold but greater than the step threshold of 125 ms";
            }
          }
          description
            "Kiss code is used for debug or maintenance purposes in devices in stratum 0 or 16";
        }
    
        typedef refid-pkt-type-info {
          type enumeration {
            enum "ntp-ref-state-kod" {
              value 0;
              description
                "Kiss of Death code or KOD contains debug or maintenance code. Refid is set to these codes in stratums 0 and 16 (unspec,invalid, unsync)";
            }
            enum
              "ntp-ref-state-resolved-with-clk-source" {
              value 1;
              description
                "CLK Source type occurs for all primary time servers in stratum 1";
            }
            enum
              "ntp-ref-state-resolved-with-ip-addr" {
              value 2;
              description
                "IP address occurs for clients in stratums >= 2 and  <=15 ";
            }
            enum "ntp-ref-state-bad-state" {
              value 3;
              description
                "Bad state which serves as a default criterion for a complete mismatch with all cases";
            }
          }
          description
            "The type of information stored in the refid";
        }
    
        typedef peer-select-status {
          type enumeration {
            enum "ntp-peer-as-backup" {
              value 0;
              description
                "The peer is a survivor but not among the first
               six peers";
            }
            enum "ntp-peer-rejected" {
              value 1;
              description
                "The peer was rejected due to a loop or due
               to becoming unreachable or due to bad synchronization distance";
            }
            enum "ntp-peer-false-ticker" {
              value 2;
              description
                "The peer or server is discarded due to false tick
               or clock errors";
            }
            enum "ntp-peer-excess" {
              value 3;
              description
                "The peer is discarded as it is not among the
               first ten peers sorted by synchronization distance";
            }
            enum "ntp-peer-outlier" {
              value 4;
              description
                "NTP server or peer rejected as outlier";
            }
            enum "ntp-peer-candidate" {
              value 5;
              description
                "Possible candidate for selection as time server";
            }
            enum "ntp-peer-sys-peer" {
              value 6;
              description
                "Peer or server selected as time server";
            }
            enum "ntp-peer-pps-peer" {
              value 7;
              description
                "Peer or server selected as time server. In this
               case the Pulse Per Second signal is used to synchronize the client and
               server or peer";
            }
          }
          description "Selection status of peer";
        }
    
        typedef peer-auth-status {
          type enumeration {
            enum "ntp-auth-ok" {
              value 0;
              description
                "The NTP client or server packet has MAC
               field and authentication succeeded";
            }
            enum "ntp-auth-bad-auth" {
              value 1;
              description
                "The NTP client or server packet has MAC
               and decryption failed with AUTH_ERROR ";
            }
            enum "ntp-auth-auth-not-configured" {
              value 2;
              description
                "The NTP client or server is not configured with authentication
               with server or client";
            }
            enum "ntp-auth-status-not-available" {
              value 3;
              description
                "The NTP client or server authentication status is not available
                as now";
            }
            enum "ntp-auth-none" {
              value 4;
              description
                "The NTP client or server packet has no MAC
               with server or peer";
            }
            enum "ntp-auth-crypto" {
              value 5;
              description
                "crypto-NAK. The MAC has four octets only and could not
               determine authentication status with peer";
            }
          }
          description
            "Status of authenticating switch with peer or server";
        }
    
        typedef peer-status-word {
          type enumeration {
            enum "crypto-flag-sig" {
              value 0;
              description
                "In autokey[public key ntp authentication protocol ], this flag is
               set when host certificate is signed by server.This is not implemented/supported as of now ";
            }
            enum "crypto-flag-leap" {
              value 1;
              description
                "In autokey, this flag is set when leap second values
               are received and validated";
            }
            enum "crypto-flag-vrfy" {
              value 2;
              description
                "In autokey,this flag is set when the trusted host identity
               credentials are  confirmed ";
            }
            enum "crypto-flag-cook" {
              value 3;
              description
                "In autokey, this flag is set when the cookie is received  and validated
               when set, key lists with nonzero cookies are generated,
               when reset cookie is zero";
            }
            enum "crypto-flag-auto" {
              value 4;
              description
                "In autokey, this flag is set when autokey values are received and validated,
               when set client can validate packets without extension field
               according to the autokey sequence";
            }
            enum "crypto-flag-cert" {
              value 5;
              description
                "In autokey, this flag is set when trusted host certificate and public key are verified";
            }
          }
          description
            "Peer status word or crypto of ntp server or ntp peer";
        }
    
        typedef peer-event {
          type enumeration {
            enum "ntp-peer-event-mobilize" {
              value 0;
              description
                "This event is used to allocate resources and
               initialize defaults or values when a NTP association is setup";
            }
            enum "ntp-peer-event-demobilize" {
              value 1;
              description
                "This event is used to tear down the resources
               associated with a NTP association";
            }
            enum "ntp-peer-event-unreachable" {
              value 2;
              description
                "This event indicates that the NTP peer is
               unreachable";
            }
            enum "ntp-peer-event-reachable" {
              value 3;
              description
                "This event indicates that the peer is reachable";
            }
            enum "ntp-peer-event-restart" {
              value 4;
              description
                "Event to indicate that the NTP process restart
               is now complete";
            }
            enum "ntp-peer-event-reply" {
              value 5;
              description
                "NTP peer or server reply event in response to a
               get time request from the client";
            }
            enum "ntp-peer-event-rate" {
              value 6;
              description
                "This event is used to synchronize the client
               and peer or server through a flow control mechanism";
            }
            enum "ntp-peer-event-deny" {
              value 7;
              description
                "Event from peer that indicates denial of access to the
               switch or router";
            }
            enum "ntp-peer-disarmed" {
              value 8;
              description
                "This event clears or resets the NTP flag after the
               leap second event so that the system is now ready to receive the next
               leap second event";
            }
            enum "ntp-peer-armed" {
              value 9;
              description
                "Peer event armed means that the event for delaying
               the clock increment by one second for a leap year will be scheduled
               next month";
            }
            enum "ntp-peer-event-newpeer" {
              value 10;
              description
                "New peer added to association";
            }
            enum "ntp-peer-event-clock" {
              value 11;
              description
                "This event indicates clock tick errors";
            }
            enum "ntp-peer-event-auth" {
              value 12;
              description
                "Event indicating status of authenticating switch
               or router with peer";
            }
            enum "ntp-peer-event-popcorn" {
              value 13;
              description
                "Popcorn event indicates a delayed NTP packet due
               to congestion in the network";
            }
            enum "ntp-peer-event-xleave" {
              value 14;
              description
                "Event for NTP peer or server leaving the
               association";
            }
            enum "ntp-peer-event-xerr" {
              value 15;
              description
                "NTP event for an error message received from
               peer or server";
            }
            enum "ntp-peer-event-tai" {
              value 16;
              description
                "Event for incorporating correction for
               International Atomic Time based on offsets from UTC";
            }
          }
          description
            "Event received by switch or router and sent by peer";
        }
    
        typedef server-type {
          type enumeration {
            enum "ntp-peer" {
              value 0;
              description
                "Remote entity is a NTP peer";
            }
            enum "ntp-server" {
              value 1;
              description
                "Remote NTP is a NTP server";
            }
            enum "ntp-unknown-type" {
              value 2;
              description
                "Status of remote entity could not be found";
            }
          }
          description
            "Status of remote entity whether server or peer";
        }
    
        grouping ref-clock-source-data {
          description
            "Clock source data refers to the clock sources that are possible including GPS and others. Currently Cisco supports only GPS";
          leaf ref-clk-src-type {
            type ref-clock-source-type;
            description
              "Contains clock source type specifics eg GPS and container extensions";
          }
        }  // grouping ref-clock-source-data
    
        grouping kiss-code-data {
          description
            "Data container for KOD code types";
          leaf kod-type {
            type kiss-code-type;
            description
              "KOD types could be any of the enumerations including INIT ACTS etc";
          }
        }  // grouping kiss-code-data
    
        grouping refid-pkt-content {
          description
            "Container for holding refid type and contents";
          choice refid-pkt-type-choice {
            description
              "Choice could be any of the 3 possibilities Kiss of death code, IP address, clock source";
            leaf ip-addr {
              type inet:ip-address;
              description
                "IPV4 or IPV6 ip address";
            }
            container kod-data {
              description
                "Container for KOD type eg INIT ACTS";
              uses ntp-ios-xe-oper:kiss-code-data;
            }  // container kod-data
            container ref-clk-src-data {
              description
                "Container for clock data. GPS is the only source supported by Cisco currently";
              uses ntp-ios-xe-oper:ref-clock-source-data;
            }  // container ref-clk-src-data
            leaf exception-code {
              type uint32;
              description
                "Bad stat or exception code in case the 3 criteria of ip, clock and kod don't match";
            }
          }  // choice refid-pkt-type-choice
        }  // grouping refid-pkt-content
    
        grouping ntp-server-address {
          description
            "NTP server address consists of the VRF name and IP
           address";
          leaf ip-addr {
            type inet:ip-address;
            description
              "IP address is the IP address of  the NTP server or
             peer";
          }
    
          leaf vrf-name {
            type string;
            description
              "VRF name is the virtual routing instance through
             which we can find the ntp server or peer";
          }
        }  // grouping ntp-server-address
    
        grouping ntp-association-list {
          description
            "Contains association description between current switch and peer  or server";
          leaf assoc-id {
            type uint16;
            description
              "Association id is a descriptor which describes the association between two NTP entities whether client and peer or client and server";
          }
    
          leaf peer-reach {
            type uint8;
            description
              "The status of the last 8 NTP packet exchanges with peers. 1 is encoded in the bitmask for a successful attempt and 0 is encoded for failure. If all the last 8 transactions with peers or messages sent to peers are successful the encoding becomes 0xff";
          }
    
          leaf peer-stratum {
            type uint32;
            description
              "Stratum in which the peer exists";
          }
    
          container refid {
            description
              "refid refers to either an IP address or a clock source or KOD type code";
            uses ntp-ios-xe-oper:refid-pkt-content;
          }  // container refid
    
          leaf reftime {
            type yang:date-and-time;
            description
              "Reference UNIX calendar time";
          }
    
          leaf last-poll-time {
            type uint64;
            description
              "The time of  the last NTP poll or update that happened in seconds. How many seconds back did the last update happen or when did the last NTP update happen ?";
          }
    
          leaf poll {
            type uint32;
            description
              "Maximum poll time of NTP in seconds expressed as a
             power of two as per model and RFC";
          }
    
          leaf delay {
            type decimal64 {
              fraction-digits 2;
            }
            description
              "Round trip delay of reaching the peer and returning";
          }
    
          leaf offset {
            type decimal64 {
              fraction-digits 2;
            }
            description
              "Difference in ms between server time and local time. offset with respect to the peer/server clock";
          }
    
          leaf jitter {
            type decimal64 {
              fraction-digits 2;
            }
            description
              "Jitter in ms refers to short-term variations in frequency of components greater than 10 hz";
          }
    
          container ntp-address {
            description
              "NTP address consists of an IP address and a VRF name";
            uses ntp-ios-xe-oper:ntp-server-address;
          }  // container ntp-address
    
          leaf num-events {
            type uint8;
            description
              "Count of number of error events received from peer";
          }
    
          leaf last-peer-event {
            type peer-event;
            description
              "Last event received from peer";
          }
    
          leaf peer-selection-status {
            type peer-select-status;
            description
              "Status of peer selection based on the NTP selection
             algorithm";
          }
    
          leaf peer-authentication-status {
            type peer-auth-status;
            description
              "Status of authentication of switch or router by peer";
          }
    
          leaf serv-type {
            type server-type;
            description
              "Whether the remote NTP device is a server or peer";
          }
    
          leaf psw-crypto {
            type peer-status-word;
            description
              "Peer status word of ntp server or peer when authentication configured";
          }
        }  // grouping ntp-association-list
    
        grouping ntp-container-data {
          description
            "NTP container holds all the status information of  the queried switch. It is a placeholder in which all global NTP information of  the switch is accessible. It also contains a reference to all associations";
          container refid {
            description
              "Reference id can either be a KOD code or a clock source or an IP address";
            uses ntp-ios-xe-oper:refid-pkt-content;
          }  // container refid
    
          leaf reftime {
            type yang:date-and-time;
            description "Unix calendar time";
          }
    
          leaf sys-poll {
            type uint8;
            description
              "Frequency or periodicity of NTP polling in seconds
             expressed as a power of two as per model and rfc";
          }
    
          leaf stratum {
            type uint32;
            description
              "How far away the current switch is in term of hops  from the primary time source of the subnet or from the root of the subnet";
          }
    
          leaf root-delay {
            type decimal64 {
              fraction-digits 2;
            }
            description
              "Round trip delay with respect to the primary time server";
          }
    
          leaf root-disp {
            type decimal64 {
              fraction-digits 2;
            }
            description
              "Deviation of offset with respect to time. All measurements are between the current switch and the root of the subnet";
          }
    
          leaf offset {
            type decimal64 {
              fraction-digits 2;
            }
            description
              "Difference in time between current switch and peer and server clock";
          }
    
          list ntp-associations {
            key "assoc-id";
            description
              "Table of NTP associations with servers and peers";
            uses ntp-ios-xe-oper:ntp-association-list;
          }  // list ntp-associations
    
          leaf freq-drift-ppm {
            type decimal64 {
              fraction-digits 2;
            }
            description
              "The second derivative of offset with time. In NTP version 4, this is always 0";
          }
        }  // grouping ntp-container-data
    
        container ntp-oper-data {
          config false;
          description "NTP operational data";
          container ntp-status-info {
            presence "ntp-status-info";
            description
              "Contains ntp status info for the queried switch or router
             which includes reference identifier, reference time, stratum
             delay and other details";
            uses ntp-ios-xe-oper:ntp-container-data;
          }  // container ntp-status-info
        }  // container ntp-oper-data
      }  // module Cisco-IOS-XE-ntp-oper
    

© 2023 YumaWorks, Inc. All rights reserved.