Add an NTP Server

Add a remote NTP server to the configuration by specifying its IP address. NTP adds this IP address to a list of servers, which the local NTP client uses to query remote time servers for time information. The list of qualified servers called to is a peer list.

About this task

For NTPv4, this procedure adds the NTP server information to the switch that is acting as an NTP client. You can configure a maximum of 10 IPv4 NTP servers and 10 IPv6 NTP servers.

Procedure

  1. Enter Global Configuration mode:

    enable

    configure terminal

  2. Add an NTP server:

    ntp server WORD<0–255>

  3. Configure additional options for the NTP server:

    ntp server WORD<0–255> [auth-enable] [authentication-key <0-65534>] [enable]

    The NTP server is automatically enabled by default.

  4. Confirm the configuration:

    show ntp server

Example

Switch:>enable
Switch:1configure terminal
Switch:1(config)#ntp server 192.0.2.187
Switch:1(config)#show ntp server

==========================================================================================
                                   NTP Server
==========================================================================================
Server Ip                                Enabled Auth    Key Id     Auth Type
------------------------------------------------------------------------------------------
192.0.2.187                              true    false   0          N/A

Variable Definitions

The following table defines parameters for the ntp server command.

Variable

Value

auth-enable

Activates MD5 or SHA1 authentication on this NTP server. Without this option, the NTP server will not have any authentication by default.

authentication-key <0-65534>

Specifies the key ID value used to generate the MD5 or SHA1 digest for the NTP server. The default authentication key is 0, which indicates disabled authentication.

enable

Activates the NTP server. To set this option to the default value, use the default operator with the command.

WORD<0–255>

Specifies the IPv4 or IPv6 address of the NTP server.