ntp
This command configures Network Time Protocol (NTP) for updating the device's date and time.
Syntax
(config-system)# ntp (ntp)#
Command |
Description |
---|---|
auth-key-id |
Defines the NTP authentication key identifier (string) for authenticating NTP messages. |
auth-key-md5 |
Defines the authentication key (string) shared between the device (client) and the NTP server, for authenticating NTP messages. |
enable |
Enables the device to synchronize its local clock (date and time) with an NTP server. |
ntp-as-oam {off|on} |
Defines the location of the Network Time Protocol (NTP). |
ntp-network-interface |
Assigns an IP Interface from the IP Interfaces table for NTP communication. |
primary-server |
Defines the NTP server FQDN or IP address. |
secondary-server |
Defines the NTP secondary server FQDN or IP address. |
update-interval |
Defines the NTP update time interval (in seconds). The value must be a multiple of 60 (seconds). For example, to set an interval of 2 hours, configure the parameter to 7200 (i.e., 2 hours is 7200 seconds). If the value is not a multiple of 60, the device automatically rounds it to the nearest multiple of 60 and logs this adjustment in a syslog message. For example, if you enter 7195, the device rounds it to 7200. |
Command Mode
Privileged User
Example
This example configures an NTP server with IP address 10.15.7.8 and updated every hour (3,600 seconds):
(config-system)# ntp
(ntp)# enable on
(ntp)# primary-server 10.15.7.8 (ntp)# update-interval 3600