NTP Client Configuration with IPv4 Address
NTP client, user can configure an association with a remote server. In this mode the client clock can synchronize to the remote server
After configuring the NTP servers, wait a few minutes before you verify that clock synchronization is successful. When the clock synchronization has actually happened, there will be an ‘*’ symbol along with the interface while you give the “show ntp peers” command.
Topology
Figure 17-26: SNTP Client and Server
NTP Client
#configure terminal | Enter Configure mode. |
(config)#feature ntp vrf management | Configure feature on default or management VRF. By default this feature runs on management VRF. |
(config)#ntp enable vrf management | This feature enables ntp. This will be enabled in default. |
(config)#ntp server 10.1.1.1 vrf management | Configure ntp server ip address. |
(config)#commit | Commit the configuration |
(config)#exit | Exit from the Configure Mode. |
Validation
#show ntp peers
-----------------------------------------------------------
Peer IP Address Serv/Peer
-----------------------------------------------------------
10.1.1.1 Server (configured)
#show ntp peer-status
Total peers : 1
* - selected for sync, + - peer mode(active),
- - peer mode(passive), = - polled in client mode
remote refid st t when poll reach delay offset jitter
==============================================================================
*10.1.1.1 LOCAL(0) 7 u 14 32 37 0.194 -4.870 3.314
Maxpoll and Minpoll Configuration
The maximum poll interval are specified in defaults to 6 (64 seconds), but can be increased by the maxpoll option to an upper limit of 16 (18.2 hours). The minimum poll interval defaults to 4 (16 seconds), and this is also the minimum value of the minpoll option.
The client will retry between minpoll and maxpoll range configured for synchronization with the server.
Client
#configure terminal | Enter Configure mode. |
(config)#feature ntp vrf management | Configure feature on default or management VRF. By default this feature runs on management VRF. |
(config)#ntp server 10.1.1.1 maxpoll 7 minpoll 5 vrf management | Configure minpoll and maxpoll range for ntp server. |
(config)#commit | Commit the configuration |
(config)#exit | Exit from the Configure Mode. |
Validation
#show ntp peers
-----------------------------------------------------------
Peer IP Address Serv/Peer
-----------------------------------------------------------
10.1.1.1 Server (configured)
#show ntp peer-status
Total peers : 1
* - selected for sync, + - peer mode(active),
- - peer mode(passive), = - polled in client mode
remote refid st t when poll reach delay offset jitter
==============================================================================
*10.1.1.1 LOCAL(0) 7 u 14 32 37 0.194 -4.870 3.314
NTP Authentication
When you enable NTP authentication, the device synchronizes to a time source only if the source carries the authentication keys specified with the source by key identifier. The device drops any packets that fail the authentication check, and prevents them from updating the local clock.
Client
#configure terminal | Enter Configure mode. |
(config)#feature ntp vrf management | Enable feature on default or management VRF. By default this feature runs on management VRF.. |
(config)#ntp server 10.1.1.1 vrf management | Configure ntp server ip address. |
(config)#ntp authenticate vrf management | Enable NTP Authenticate. NTP authentication is disabled by default. |
(config)#ntp authentication-key 1234 md5 text vrf management | Configure ntp authentication key along with md5 value. |
(config)#ntp trusted-key 1234 vrf management | Configure trusted key <1-65535> |
(config)#commit | Commit the configuration |
(config)#exit | Exit from the Configure Mode. |
Validation
#show ntp authentication-status
Authentication enabled
#show ntp authentication-keys
--------------------------
Auth Key MD5 String
--------------------------
1234 SWWX
#show ntp trusted-keys
Trusted Keys:
1234
Last modified date: 10/19/2023