# NTP Configuration Mode Commands

The NTP Configuration Mode is used to manage the Network Time Protocol (NTP) options for the entire system.

IMPORTANT:

The commands or keywords/variables that are available are dependent on platform type, product version, and installed license(s).
enable

Enables the use of the Network Time Protocol (NTP) for synchronizing the system clock. By default, NTP is not enabled externally and should be configured when the system is initially installed. When enabled, the active ASR 5000 SMC or ASR 5500 MIO will synchronize with external sources. If not enabled, the active SMC or MIO will use its local clock as a time source. In the event of an NTP server or network outage, an already running SMC or MIO will continue to use NTP to maintain time accuracy, but in a holdover mode.
Platform:

ASR 5000

ASR 5500
Product:

All
Privilege:

Security Administrator, Administrator
Syntax

    enable [ context ]

context

Default: local

Specifies the context for which NTP is to be enabled as an alphanumeric string of 1 through 79 characters.

IMPORTANT:

NTP must be configured for use in the local context only. Use of other contexts will cause issues.
Usage:

Sets the NTP server to be used for the system. Only one NTP server may be active at any given time.

The system uses NTP to synchronize internal clocks on the chassis to external time sources (typically GPS NTP sources, or other Stratum 2 or 3 servers, switches or routers).

All cards with CPUs synchronize to the active SMC or MIO internally. This occurs even if an external NTP server is not configured. In the event of a SMC or MIO switchover, all other cards will start synchronizing with the newly active SMC or MIO automatically.

If any NTP server is enabled, the chassis system clock will be synchronized to the active NTP server which covers all contexts for timing synchronization.

Refer to the System Administration Guide for additional information on configuring NTP.
Example:

The following command enables use of NTP for the local context.

    enable

end

Exits the current configuration mode and returns to the Exec mode.
Product:

All
Privilege:

Security Administrator, Administrator
Syntax

    end

Usage:

Use this command to return to the Exec mode.
exit

Exits the current mode and returns to the parent configuration mode.
Product:

All
Privilege:

Security Administrator, Administrator
Syntax

    exit

Usage:

Use this command to return to the parent configuration mode.
server

Configures a Network TIme Protocol (NTP) server for use by the local NTP client in synchronizing the system clock.
Platform:

ASR 5000

ASR 5500
Product:

All
Privilege:

Security Administrator, Administrator
Syntax

    server ip_address [ prefer ] [ version number ] [ minpoll poll_period ] [ maxpoll poll_period ]

    no server ip_address

no

Indicates the server specified is to be removed from the list of NTP servers for clock synchronization.
ip_address

Specifies the IP address of the NTP server to be used for clock synchronization in IPv4 dotted-decimal or IPv6 colon-separated-hexadecimal notation.

NTP should be configured for at least three external NTP servers. With three or more servers, outlyers and broken or misconfigured servers can be detected and excluded. Generally, the more servers the better (within reason).
prefer

Indicates the NTP server specified to be the preferred server. Only one server can be set to preferred. The preferred server is the first one contacted for clock synchronization.

IMPORTANT:

Use of the prefer keyword is not recommended.

IMPORTANT:

Do not change the version, minpoll or maxpoll keyword settings unless instructed to do so by Cisco TAC.
version number

Specifies the network timing protocol version to use for server communications as an integer from 1 to 4. Default: 4 (RFC 5905)
minpoll poll_period

Specifies the minimum polling interval (in seconds) for NTP messages as a power of 2. poll_period is the exponent (power of) expressed as an integer from 6 through 17. For example, if you specify the number 6, the value is 2^6 and the resultant poll period is 64 seconds. Default: 6
maxpoll poll_period

Specifies the maximum polling interval (in seconds) for NTP messages as a power of 2. poll_period is the exponent (power of) expressed as an integer from 6 through 17. For example, if you specify the number 10, the value is 2^10 and the resultant poll period is 1024 seconds. Default: 10
Usage:

Configure the NTP servers in response to network changes.

Refer to the System Administration Guide for important information on configuring NTP servers with local sources, and using a load balancer to communicate with external NTP servers.

IMPORTANT:

Adding, removing, or modifying an NTP server configuration entry causes the NTP client to restart itself and resynchronize with all configured NTP servers.
Example:
The following command adds the NTP server with address 10.2.3.4 to the list of NTP servers.

    server 10.2.3.4