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
