Before You Begin
Make sure that you configured the NTP server with the authentication keys that you plan to specify in this
procedure.
Procedure
PurposeCommand or Action
Enters global configuration mode.switch# configure terminal
Step 1
Defines the authentication keys. The device does not
synchronize to a time source unless the source has one of
switch(config)# [no] ntp
authentication-key number md5
md5-string
Step 2
these authentication keys and the key number is specified
by the ntp trusted-key number command.
(Optional)
Displays the configured NTP authentication keys.
switch(config)# show ntp
authentication-keys
Step 3
Specifies one or more keys that a time source must provide
in its NTP packets in order for the device to synchronize
to it. The range for trusted keys is from 1 to 65535.
switch(config)# [no]ntp trusted-key
number
Step 4
This command provides protection against accidentally
synchronizing the device to a time source that is not
trusted.
(Optional)
Displays the configured NTP trusted keys.
switch(config)# show ntp
trusted-keys
Step 5
Enables or disables the NTP authentication feature. NTP
authentication is disabled by default.
switch(config)# [no] ntp
authenticate
Step 6
(Optional)
Displays the status of NTP authentication.
switch(config)# show ntp
authentication-status
Step 7
(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 8
This example shows how to configure the device to synchronize only to time sources that provide authentication
key 42 in their NTP packets:
switch# config t
Enter configuration commands, one per line. End with CNTL/Z.
switch(config)# ntp authentication-key 42 md5 aNiceKey
switch(config)# ntp trusted-key 42
switch(config)# ntp authenticate
switch(config)# copy running-config startup-config
[########################################] 100%
switch(config)#
Cisco Nexus 3548 Switch NX-OS System Management Configuration Guide, Release 6.x
58
Configuring NTP
Configuring NTP Authentication