Enable NTP Globally

Enable NTP globally. Default values are in effect for most parameters. You can customize NTP by modifying parameters.

Procedure

  1. Enter Global Configuration mode:

    enable

    configure terminal

  2. Optional: Configure the NTP interval time (between successive NTP updates):

    ntp interval <4-17>

  3. Enable NTP globally:

    ntp

  4. Confirm the global configuration:

    show ntp

Example

Specify the time interval between NTP updates, and then enable NTP globally.

Switch:1>enable
Switch:1#configure terminal
Switch:1(config)#ntp interval 10
Switch:1(config)#ntp
Confirm the configuration:
Switch:1(config)#show ntp

=========================================================================================
                                   NTP Master
=========================================================================================
Version   Enabled    Stratum
-----------------------------------------------------------------------------------------
4         False      10

=========================================================================================
                                   NTP Client
=========================================================================================
Version  Enabled   Interval  Last Update Time                Synchronized To
-----------------------------------------------------------------------------------------
4        True      10        Thu Jul 18 08:32:59 2019 EDT    192.0.2.0 (Stratum:2)

Variable Definitions

The following table defines parameters for the ntp command.

Variable

Value

authentication-key <1–65534> WORD<0–20>

Creates an authentication key for MD5 or SHA1 authentication. The default configuration is to delete the authentication key.

NTP server MD5 or SHA1 authentication does not support passwords (keys) that start with a special character or contain a space between characters.

WORD<0–20> specifies the secret key.

type <md5 | sha1>

Specifies the type of authentication as MD5 or SHA1. The default is MD5 authentication.

interval <4-17>

Specifies the time interval between successive NTP updates as a power of 2 in seconds. The default for NTPv4 is 2 to the power of 8 seconds.