PurposeCommand or Action
Use the key keyword to configure a key to be used while
communicating with the NTP peer. The range for the key-id
argument is from 1 to 65535.
dns-name} [key key-id]
[maxpoll max-poll] [minpoll
min-poll] [prefer] [use-vrf
vrf-name]
Use the maxpoll and minpoll keywords to configure the maximum
and minimum intervals in which to poll a peer. The range for the
max-poll and min-poll arguments is from 4 to 16 seconds, and the
default values are 6 and 4, respectively.
Use the prefer keyword to make this the preferred NTP server for
the device.
Use the use-vrf keyword to configure the NTP server to
communicate over the specified VRF. The vrf-name argument can
be default, management, or any case-sensitive alphanumeric string
up to 32 characters.
(Optional)
Displays the configured server and peers.
switch(config)# show ntp
peers
Step 4
A domain name is resolved only when you have a DNS
server configured.
Note
(Optional)
Saves the change persistently through reboots and restarts by copying
the running configuration to the startup configuration.
switch(config)# copy
running-config startup-config
Step 5
This example shows how to configure an NTP server and peer:
switch# config t
Enter configuration commands, one per line. End with CNTL/Z.
switch(config)# ntp server 192.0.2.10 key 10 use-vrf Red
switch(config)# ntp peer 2001:0db8::4101 prefer use-vrf Red
switch(config)# show ntp peers
--------------------------------------------------
Peer IP Address Serv/Peer
--------------------------------------------------
2001:0db8::4101 Peer (configured)
192.0.2.10 Server (configured)
switch(config)# copy running-config startup-config
[########################################] 100%
switch(config)#
Configuring NTP Authentication
You can configure the device to authenticate the time sources to which the local clock is synchronized. When
you enable NTP authentication, the device synchronizes to a time source only if the source carries one of the
authentication keys specified by the ntp trusted-key command. The device drops any packets that fail the
authentication check and prevents them from updating the local clock. NTP authentication is disabled by
default.
Cisco Nexus 3548 Switch NX-OS System Management Configuration Guide, Release 6.x
57
Configuring NTP
Configuring NTP Authentication