liveBook · Manning

Authentication key

As explained in Acing the CCNA Exam: Volume 2 Advanced Networking and Security

ntp authentication-key is a Cisco IOS configuration command that creates an NTP authentication key with a numeric identifier, algorithm, and secret.

An authentication key lets NTP clients verify that a server is genuine rather than an attacker using a spoofed address. Cisco IOS creates it with ntp authentication-key key-number md5 key, where the number identifies the key and the key is the shared secret. section 2.3.3

Configure and use the key as a coordinated three-step process:

  • Create the identical key on both devices; both the numeric identifier and secret must match. section 2.3.3
  • Mark the key as trusted with ntp trusted-key key-number; an untrusted key cannot be used. section 2.3.3
  • On the client, reference the key with ntp server ip-address key key-number, causing authenticated NTP messages and synchronization. section 2.3.3
R1(config)# ntp master                                     #1
R1(config)# ntp authentication-key 42 md5 AcingTheCCNA!    #2
R1(config)# ntp trusted-key 42                             #3
#1 Makes R1 an NTP server
#2 Configures an NTP authentication key
#3 Specifies the key as trusted

Shows the server-side key creation and trusted-key commands alongside their operational purposes. section 2.3.3

R2(config)# ntp authentication-key 42 md5 AcingTheCCNA!     #1
R2(config)# ntp trusted-key 42                              #2
R2(config)# ntp server 10.0.0.1 key 42                      #3
#1 Configures an NTP authentication key
#2 Specifies the key as truste
#3 Authenticates R1 using key 42

Shows matching client configuration and the authenticated ntp server command. section 2.3.3

How Acing the CCNA Exam: Volume 2 Advanced Networking and Security covers it

How deep it goes
Explains creation, trust designation, matching requirements, and client use, but does not detail message-level authentication internals.
Examples
Uses key 42 with secret AcingTheCCNA! between R1 and R2, then authenticates R1 through ntp server 10.0.0.1 key 42.
What it assumes
Assumes basic NTP server and client configuration while teaching key creation, trust, and matching from the command syntax.
What you can do after
Configure authenticated NTP synchronization between a client and an authorized server.
How it connects
Connects NTP authentication with trusted keys, NTP clients, NTP servers, and NTP peers.

Related concepts

This explainer was generated by Manning's knowledge graph from the text of Acing the CCNA Exam: Volume 2 Advanced Networking and Security. The section links point to the parts of the book it draws on.