ntp peer

Configures the NTP peers and specifies the peers to synchronize the system clock. A maximum of 8 NTP peers can be configured.

Syntax

ntp peer {ip_address } [ key key_id ] [ maxpoll interval ] [ minpoll interval] [ use-vrfvrf_name] [ version 3 | 4]
no ntp peer{ip_address }

Command Default

No default peers are configured.

Parameters

ip_address
Specifies the IPv4 or IPv6 address of the NTP peer.
key key_id
Specifies the symmetric key ID. By default, no symmetric key is configured. The range is 1 to 65,534.
maxpoll interval
Specifies the longest polling interval. The range is 4 to 17. Default is 10. The interval argument is power of 2, for example: 3=8s, 4=16s, 5=32s, 6=64s, 7=128s, 8=256s, 9=512s.
minpoll interval
Specifies the shortest polling interval. The range is 4 to 17. The default is 6. The interval argument is power of 2, for example: 3=8s, 4=16s, 5=32s, 6=64s, 7=128s, 8=256s, 9=512s.
use-vrfvrf_name
Specifies the VRF name to synchronize the time with server. The default is mgmt-vrf.
version 3 | 4
Specifies the NTP version supported by the peer. The default is 4.

Modes

Global configuration mode

Usage Guidelines

This command is not effective if the NTP is enabled in client-only mode. If the peer is already mobilized as symmetric passive, then configuring statically will not be effective.

The no form of the command removes the peer configuration and applied options.

Examples

Configures the NTP peers and specify the peers to synchronize the system clock.

device(config)# ntp peer 1.2.3.4
device(config-peer-1.2.3.4/mgmt-vrf)# key 1 maxpoll 9 minpoll 7 version 3

The following error message is displayed when the minimum poll value is greater than maximum poll value: Minimum poll interval cannot be greater than maximum poll interval.