Cisco-IOS-XR-ip-ntp-cfg

This module contains a collection of YANG definitions for Cisco IOS-XR ip-ntp package configuration. This module contains defin...

  • Version: 2019-10-31

    Cisco-IOS-XR-ip-ntp-cfg@2019-10-31


    
      module Cisco-IOS-XR-ip-ntp-cfg {
    
        yang-version 1;
    
        namespace
          "http://cisco.com/ns/yang/Cisco-IOS-XR-ip-ntp-cfg";
    
        prefix ip-ntp-cfg;
    
        import ietf-inet-types {
          prefix inet;
        }
        import Cisco-IOS-XR-types {
          prefix xr;
        }
        import cisco-semver {
          prefix semver;
        }
        import Cisco-IOS-XR-snmp-agent-cfg {
          prefix a1;
        }
    
        organization "Cisco Systems, Inc.";
    
        contact
          "Cisco Systems, Inc.
         Customer Service
         
         Postal: 170 West Tasman Drive
         San Jose, CA 95134
         
         Tel: +1 800 553-NETS
         
         E-mail: cs-yang@cisco.com";
    
        description
          "This module contains a collection of YANG definitions
         for Cisco IOS-XR ip-ntp package configuration.
         
         This module contains definitions
         for the following management objects:
           ntp: NTP configuration
         
         This YANG module augments the
           Cisco-IOS-XR-snmp-agent-cfg
         module with configuration data.
         
         Copyright (c) 2013-2019 by Cisco Systems, Inc.
         All rights reserved.";
    
        revision "2019-10-31" {
          description
            "Added mandatory nodes and presence containers.";
        }
    
        revision "2019-04-05" {
          description
            "Establish semantic version baseline.";
        }
    
        revision "2017-10-15" {
          description
            "Removed presence statement generated from internal CLI data.";
        }
    
        revision "2017-09-07" {
          description
            "Fixed type translation error.";
        }
    
        revision "2017-05-01" {
          description
            "Fixing backward compatibility error in module.";
        }
    
        revision "2015-11-09" {
          description "IOS XR 6.0 revision.";
        }
    
        semver:module-version "2.0.0";
        semver:module-version "1.0.0";
    
        typedef Ntp-prefer-peer {
          type empty;
          description "Prefer";
        }
    
        typedef Ntpdscp {
          type enumeration {
            enum "ntp-precedence" {
              value 0;
              description "Precedence Value";
            }
            enum "ntpdscp" {
              value 1;
              description "DSCP Value";
            }
          }
          description "Ntpdscp";
        }
    
        typedef Ntp-key-number {
          type uint32 {
            range "1..65535";
          }
          description "Ntp key number";
        }
    
        typedef Ntpttl {
          type uint32 {
            range "1..255";
          }
          description "Ntpttl";
        }
    
        typedef Ntp-burst {
          type empty;
          description "Burst";
        }
    
        typedef Ntpi-burst {
          type empty;
          description "IBurst";
        }
    
        typedef Ntp-version {
          type uint32 {
            range "2..4";
          }
          description "Ntp version";
        }
    
        typedef Ntp-peer {
          type enumeration {
            enum "peer" {
              value 0;
              description "Peer";
            }
            enum "server" {
              value 1;
              description "Server";
            }
          }
          description "Ntp peer";
        }
    
        typedef Ntp-access-af {
          type enumeration {
            enum "ipv4" {
              value 0;
              description "IPv4";
            }
            enum "ipv6" {
              value 1;
              description "IPv6";
            }
          }
          description "Ntp access af";
        }
    
        typedef Ntp-access {
          type enumeration {
            enum "peer" {
              value 0;
              description "Peer";
            }
            enum "serve" {
              value 1;
              description "Serve";
            }
            enum "serve-only" {
              value 2;
              description "Serve Only";
            }
            enum "query-only" {
              value 3;
              description "Query Only";
            }
          }
          description "Ntp access";
        }
    
        container ntp {
          description "NTP configuration";
          container admin-types {
            description
              "Configure NTP server admin-plane";
            list admin-type {
              key "peer-type";
              description
                "Configure NTP server admin plane";
              leaf peer-type {
                type Ntp-peer;
                description "Peer or Server";
              }
    
              leaf ntp-version {
                type Ntp-version;
                description "NTP version";
              }
    
              leaf authentication-key {
                type Ntp-key-number;
                description "Authentication Key";
              }
    
              leaf min-poll {
                type uint32 {
                  range "4..17";
                }
                description
                  "Minimum poll interval";
              }
    
              leaf max-poll {
                type uint32 {
                  range "4..17";
                }
                description
                  "Maxinum poll interval";
              }
    
              leaf preferred-peer {
                type Ntp-prefer-peer;
                description "Preferred peer";
              }
    
              leaf burst {
                type Ntp-burst;
                description "Use burst mode";
              }
    
              leaf iburst {
                type Ntpi-burst;
                description "Use iburst mode";
              }
            }  // list admin-type
          }  // container admin-types
    
          container peer-vrfs {
            description
              "Configures NTP Peers or Servers";
            list peer-vrf {
              key "vrf-name";
              description
                "Configures NTP Peers or Servers for a single
               VRF. The 'default' must also be specified for
               default VRF";
              container peer-ipv4s {
                description
                  "Configures IPv4 NTP Peers or Servers";
                list peer-ipv4 {
                  key "address-ipv4";
                  description
                    "Configure an IPv4 NTP server or peer";
                  leaf address-ipv4 {
                    type inet:ipv4-address-no-zone;
                    description
                      "IPv4 Address of a peer";
                  }
    
                  list peer-type-ipv4 {
                    key "peer-type";
                    description
                      "Configure an IPv4 NTP server or peer";
                    leaf peer-type {
                      type Ntp-peer;
                      description
                        "Peer or Server";
                    }
    
                    leaf ntp-version {
                      type Ntp-version;
                      description "NTP version";
                    }
    
                    leaf authentication-key {
                      type Ntp-key-number;
                      description
                        "Authentication Key";
                    }
    
                    leaf min-poll {
                      type uint32 {
                        range "4..17";
                      }
                      description
                        "Minimum poll interval";
                    }
    
                    leaf max-poll {
                      type uint32 {
                        range "4..17";
                      }
                      description
                        "Maxinum poll interval";
                    }
    
                    leaf preferred-peer {
                      type Ntp-prefer-peer;
                      description
                        "Preferred peer";
                    }
    
                    leaf source-interface {
                      type xr:Interface-name;
                      description
                        "Source interface of this peer";
                    }
    
                    leaf burst {
                      type Ntp-burst;
                      description
                        "Use burst mode";
                    }
    
                    leaf iburst {
                      type Ntpi-burst;
                      description
                        "Use iburst mode";
                    }
                  }  // list peer-type-ipv4
                }  // list peer-ipv4
              }  // container peer-ipv4s
    
              container peer-ipv6s {
                description
                  "Configuration NTP Peers or Servers of IPV6";
                list peer-ipv6 {
                  key "address-ipv6";
                  description
                    "Configure a NTP server or peer";
                  leaf address-ipv6 {
                    type inet:ipv6-address-no-zone;
                    description
                      "Address of a peer";
                  }
    
                  list peer-type-ipv6 {
                    key "peer-type";
                    description
                      "Configure a NTP server or peer";
                    leaf peer-type {
                      type Ntp-peer;
                      description
                        "Peer or Server";
                    }
    
                    leaf ntp-version {
                      type Ntp-version;
                      description "NTP version";
                    }
    
                    leaf authentication-key {
                      type Ntp-key-number;
                      description
                        "Authentication Key";
                    }
    
                    leaf min-poll {
                      type uint32 {
                        range "4..17";
                      }
                      description
                        "Minimum poll interval";
                    }
    
                    leaf max-poll {
                      type uint32 {
                        range "4..17";
                      }
                      description
                        "Maxinum poll interval";
                    }
    
                    leaf preferred-peer {
                      type Ntp-prefer-peer;
                      description
                        "Preferred peer";
                    }
    
                    leaf source-interface {
                      type xr:Interface-name;
                      description
                        "Source interface of this peer";
                    }
    
                    leaf burst {
                      type Ntp-burst;
                      description
                        "Use burst mode";
                    }
    
                    leaf iburst {
                      type Ntpi-burst;
                      description
                        "Use iburst mode";
                    }
    
                    leaf address-ipv6 {
                      type inet:ipv6-address-no-zone;
                      description "IPv6 address";
                    }
                  }  // list peer-type-ipv6
                }  // list peer-ipv6
              }  // container peer-ipv6s
    
              leaf vrf-name {
                type xr:Cisco-ios-xr-string;
                description "VRF name";
              }
            }  // list peer-vrf
          }  // container peer-vrfs
    
          container dscp-ipv4 {
            presence
              "Indicates a dscp-ipv4 node is configured.";
            description
              " Set IP DSCP value for outgoing NTP IPV4 packets";
            leaf mode {
              type Ntpdscp;
              mandatory true;
              description
                "NTPPRECEDENCE (0) to specify Precedence value
               NTPDSCP (1) to specify DSCP value";
            }
    
            leaf dscp-or-precedence-value {
              type uint32 {
                range "0..63";
              }
              mandatory true;
              description
                "If Mode is set to 'NTPPRECEDENCE(0)' specify
               Precedence value , if Mode is set to
               'NTPDSCP(1)' specify DSCP";
            }
          }  // container dscp-ipv4
    
          container dscp-ipv6 {
            presence
              "Indicates a dscp-ipv6 node is configured.";
            description
              " Set IP DSCP value for outgoing NTP IPV6 packets";
            leaf mode {
              type Ntpdscp;
              mandatory true;
              description
                "NTPPRECEDENCE(0) to specify Precedence value
               NTPDSCP(1) to specify DSCP value";
            }
    
            leaf dscp-or-precedence-value {
              type uint32 {
                range "0..63";
              }
              mandatory true;
              description
                "If Mode is set to 'NTPPRECEDENCE(0)' specify
               Precedence value , if Mode is set to
               'NTPDSCP(1)' specify DSCP";
            }
          }  // container dscp-ipv6
    
          container sources {
            description
              "Configure  NTP source interface";
            list source {
              key "vrf-name";
              description
                "Configure  NTP source interface";
              leaf vrf-name {
                type xr:Cisco-ios-xr-string;
                description "VRF name";
              }
    
              leaf source-interface {
                type xr:Interface-name;
                mandatory true;
                description
                  "Source Interface for NTP";
              }
            }  // list source
          }  // container sources
    
          container drift {
            description "NTP drift";
            container file {
              presence
                "Contains mandatory nodes that used to set default values";
              description
                "File containing drift value";
              leaf location {
                type string;
                mandatory true;
                description
                  "disk0 or apphost or config or ftp or harddisk
                 or rootfs or tftp. Defaults to PWD if none
                 specified";
              }
    
              leaf filename {
                type string;
                description
                  "File containing drift value";
              }
            }  // container file
    
            leaf aging-time {
              type uint32 {
                range "0..65535";
              }
              description "Drift Aging Time";
            }
          }  // container drift
    
          container authentication {
            description
              "Configure NTP Authentication keys";
            container keys {
              description
                "Authentication Key Table";
              list key {
                key "key-number";
                description
                  "Authentication key for trusted time sources";
                leaf key-number {
                  type Ntp-key-number;
                  description
                    "Authentication Key number";
                }
    
                leaf authentication-key {
                  type string;
                  mandatory true;
                  description
                    "Authentication key - maximum 32 characters";
                }
              }  // list key
            }  // container keys
    
            container trusted-keys {
              description
                "Key numbers for trusted time sources";
              list trusted-key {
                key "key-number";
                description
                  "Configure NTP trusted key";
                leaf key-number {
                  type Ntp-key-number;
                  description "Key number";
                }
              }  // list trusted-key
            }  // container trusted-keys
    
            leaf enable {
              type empty;
              description
                "Enable NTP authentication keys";
            }
          }  // container authentication
    
          container passive {
            description
              "Configure NTP passive associations";
            leaf enable {
              type empty;
              description
                "Enable NTP Passive associations";
            }
          }  // container passive
    
          container interface-tables {
            description
              "NTP per interface configuration";
            list interface-table {
              key "vrf-name";
              description
                "NTP per interface configuration";
              leaf vrf-name {
                type xr:Cisco-ios-xr-string;
                description "VRF name";
              }
    
              list interface {
                key "interface";
                description
                  "Name of the interface";
                container interface-multicast {
                  description
                    "Configure NTP multicast service";
                  container multicast-clients {
                    description
                      "Configures multicast client peers";
                    list multicast-client {
                      key "ip-address";
                      description
                        "Listen to NTP multicasts";
                      leaf ip-address {
                        type inet:ip-address-no-zone;
                        description
                          "IP address of a multicast group";
                      }
                    }  // list multicast-client
                  }  // container multicast-clients
    
                  container multicast-servers {
                    description
                      "Configures multicast server peers";
                    list multicast-server {
                      key "ip-address";
                      description
                        "Configure NTP multicast group server peer";
                      leaf ip-address {
                        type inet:ip-address-no-zone;
                        description
                          "IP address of a multicast group";
                      }
    
                      leaf authentication-key {
                        type Ntp-key-number;
                        description
                          "Authentication key";
                      }
    
                      leaf version {
                        type Ntp-version;
                        description
                          "NTP version";
                      }
    
                      leaf ttl {
                        type Ntpttl;
                        description "TTL";
                      }
                    }  // list multicast-server
                  }  // container multicast-servers
                }  // container interface-multicast
    
                container interface-broadcast {
                  description
                    "Configure NTP broadcast service";
                  container broadcast-servers {
                    description
                      "Configure NTP broadcast";
                    list broadcast-server {
                      key "broadcast-type";
                      description
                        "Configure NTP broadcast server";
                      leaf broadcast-type {
                        type xr:Cisco-ios-xr-string;
                        description
                          "Broadcast Type";
                      }
    
                      leaf address {
                        type inet:ipv4-address-no-zone;
                        description
                          "Destination broadcast IPv4 address";
                      }
    
                      leaf authentication-key {
                        type Ntp-key-number;
                        description
                          "Authentication key";
                      }
    
                      leaf ntp-version {
                        type Ntp-version;
                        description
                          "NTP version";
                      }
                    }  // list broadcast-server
                  }  // container broadcast-servers
    
                  leaf broadcast-client {
                    type empty;
                    description
                      "Listen to NTP broadcasts";
                  }
                }  // container interface-broadcast
    
                leaf disable {
                  type empty;
                  description "Disable NTP";
                }
    
                leaf interface {
                  type xr:Interface-name;
                  description "interface";
                }
              }  // list interface
            }  // list interface-table
          }  // container interface-tables
    
          container access-group-tables {
            description "Control NTP access";
            list access-group-table {
              key "vrf-name";
              description "Control NTP access";
              leaf vrf-name {
                type xr:Cisco-ios-xr-string;
                description "VRF name";
              }
    
              list access-group-af-table {
                key "af";
                description
                  "Configure NTP access address family";
                leaf af {
                  type Ntp-access-af;
                  description "Address family";
                }
    
                list access-group {
                  key "access-group-type";
                  description
                    "Configure NTP access group";
                  leaf access-group-type {
                    type Ntp-access;
                    description
                      "Access group type";
                  }
    
                  leaf access-list-name {
                    type string;
                    mandatory true;
                    description
                      "Access list name - maximum 32 characters";
                  }
                }  // list access-group
              }  // list access-group-af-table
            }  // list access-group-table
          }  // container access-group-tables
    
          leaf max-associations {
            type uint32 {
              range "0..4294967295";
            }
            description
              "Set maximum number of associations";
          }
    
          leaf master {
            type uint32 {
              range "1..20";
            }
            default "8";
            description
              "Act as NTP master clock";
          }
    
          leaf broadcast-delay {
            type uint32 {
              range "1..999999";
            }
            description
              "Estimated round-trip delay";
          }
    
          leaf log-internal-sync {
            type empty;
            description
              "To enable logging internal sync conflicts";
          }
    
          leaf update-calendar {
            type empty;
            description
              "To enable calendar update with NTP time";
          }
        }  // container ntp
      }  // module Cisco-IOS-XR-ip-ntp-cfg
    

© 2023 YumaWorks, Inc. All rights reserved.