NTP Configuration Mode Commands

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

Mode

Exec > Global Configuration > NTP Configuration

configure > ntp

Entering the above command sequence results in the following prompt:

[local]host_name(config-ntp)# 

Important


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



Important


For information on common commands available in this configuration mode, refer to the Common Commands chapter.


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.

Product

All

Privilege

Security Administrator, Administrator

Mode

Exec > Global Configuration > NTP Configuration

configure > ntp

Entering the above command sequence results in the following prompt:

[local]host_name(config-ntp)# 

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 Guidelines

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  

server

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

Product

All

Privilege

Security Administrator, Administrator

Mode

Exec > Global Configuration > NTP Configuration

configure > ntp

Entering the above command sequence results in the following prompt:

[local]host_name(config-ntp)# 

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 Guidelines

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 209.165.200.228 to the list of NTP servers.
server 209.165.200.228 

vlan

Use the NTP Configuration Mode to enable Network TIme Protocol (NTP) on tagged interface.

Product

All

Privilege

Security Administrator, Administrator

Mode

Exec > Global Configuration > NTP Configuration

configure > ntp

Entering the above command sequence results in the following prompt:

[local]host_name(config-ntp)# 

Syntax

[ no ] vlan vlan_id 

vlan_id is the vlan where the local context interface is bound to. After configuration the NTP daemon starts listening on the tagged interface.

no

Resets the NTP configuration to default. The NTP daemon will start listening on the default untagged interface.

Usage Guidelines

Configure the NTP vlan on a tagged interface.

Example

The following command makes the NTP daemon to listen on the interface bound to vlan 101 .

config 
   ntp 
      enable 
      vlan 101 
      exit  
   exit