Skip to content

NTP

NTP (Network Time Protocol) is a hierarchical time synchronization protocol that maintains accurate time across network devices by synchronizing with authoritative time sources and distributing precise time information throughout the network infrastructure. It operates using a stratum-based system where lower stratum numbers indicate higher accuracy, supporting both server and peer relationships with authentication mechanisms to ensure time source integrity. NTP is critical for network operations including log correlation, certificate validation, debugging, security event analysis, and distributed system coordination, providing microsecond-level accuracy essential for modern network management and compliance requirements.

Diagram

Diagram

Classes

configuration (iosxe.devices)

NameTypeConstraintMandatoryDefault Value
ntpClass[ntp]No

ntp (iosxe.devices.configuration)

NameTypeConstraintMandatoryDefault Value
authenticateBooleantrue, falseNo
loggingBooleantrue, falseNo
access_group_peer_aclStringNo
access_group_query_only_aclStringNo
access_group_serve_aclStringNo
access_group_serve_only_aclStringNo
authentication_keysList[authentication_keys]No
clock_periodIntegermin: 0, max: 4294967295No
delete_modeChoiceall, attributesNo
masterBooleantrue, falseNo
master_stratumIntegermin: 1, max: 15No
passiveBooleantrue, falseNo
update_calendarBooleantrue, falseNo
source_interface_typeChoiceLoopback, Vlan, GigabitEthernet, TenGigabitEthernet, FortyGigabitEthernet, HundredGigabitEthernet, PortChannelNo
source_interface_idStringNo
serversList[servers]No
peersList[peers]No

authentication_keys (iosxe.devices.configuration.ntp)

NameTypeConstraintMandatoryDefault Value
numberIntegermin: 1, max: 4294967295Yes
trustedBooleantrue, falseNo
modeChoicemd5, cmac_aes_128, hmac_sha1, hmac_sha2_256, sha1, sha2No
keyStringNo
encryption_typeIntegermin: 0, max: 4294967295No

servers (iosxe.devices.configuration.ntp)

NameTypeConstraintMandatoryDefault Value
ipIPYes
vrfStringNo
source_interface_typeChoiceLoopback, Vlan, GigabitEthernet, FiveGigabitEthernet, TenGigabitEthernet, FortyGigabitEthernet, HundredGigabitEthernet, PortChannel, PortChannelSubinterfaceNo
source_interface_idStringNo
keyIntegermin: 1, max: 4294967295No
preferBooleantrue, falseNo
versionIntegermin: 1, max: 4No

peers (iosxe.devices.configuration.ntp)

NameTypeConstraintMandatoryDefault Value
ipIPYes
vrfStringNo
source_interface_typeChoiceLoopback, Vlan, GigabitEthernet, FiveGigabitEthernet, TenGigabitEthernet, FortyGigabitEthernet, HundredGigabitEthernet, PortChannelNo
source_interface_idStringNo
keyIntegermin: 1, max: 4294967295No
preferBooleantrue, falseNo
versionIntegermin: 1, max: 4No

Examples

iosxe:
devices:
- name: Device1
configuration:
ntp:
authenticate: true
logging: true
access_group_peer_acl: NTP-PEER-ACL
access_group_query_only_acl: NTP-QUERY-ACL
access_group_serve_acl: NTP-SERVE-ACL
access_group_serve_only_acl: NTP-SERVE-ONLY-ACL
authentication_keys:
- number: 1
trusted: true
mode: md5
key: MySecretKey123
encryption_type: 0
- number: 2
trusted: true
mode: sha1
key: AnotherSecretKey456
encryption_type: 0
- number: 3
mode: hmac_sha1
key: HmacKey789
encryption_type: 0
- number: 4
trusted: true
mode: hmac_sha2_256
key: Sha256Key101112
encryption_type: 0
clock_period: 17179869184
master: true
master_stratum: 8
passive: true
update_calendar: true
source_interface_type: Loopback
source_interface_id: "0"
servers:
- ip: 129.6.15.28
source_interface_type: Loopback
source_interface_id: "0"
key: 1
prefer: true
version: 4
- ip: 216.239.35.0
vrf: MGMT
key: 2
prefer: false
version: 4
peers:
- ip: 192.168.1.10
source_interface_type: Loopback
source_interface_id: "1"
key: 3
prefer: true
version: 4
- ip: 192.168.1.20
vrf: PEER-VRF
key: 4
prefer: false
version: 3