OcNOS SP : System Management Guide : NTP Configuration : NTP Server Configuration
NTP Server Configuration
The Network Time Protocol (NTP) synchronizes the time of day among a set of distributed time servers and clients so that you can correlate events when you receive system logs and other time-specific events from multiple network de-vices. NTP uses the User Datagram Protocol (UDP) as its transport protocol. All NTP communications use Coordinated Universal Time (UTC).
An NTP server usually receives its time from an authoritative time source, such as a radio clock or an atomic clock attached to a time server, and then distributes this time across the network.
Above explained NTP Server and Client functionality will be supported in OcNOS. NTP Access restrictions can be configured to allow Client devices to access NTP Server.
Topology
The procedures in this section use the topology as mentioned below:
Setup consists of two nodes. One node acting as NTP Master and the other node acting as NTP Client.
 
Synchronization of NTP Master and NTP Client
Configuration of VRF Management
NTP Master
 
#configure terminal
Enter configure mode
(config)#feature ntp vrf management
Enable feature ntp
(config)#ntp enable vrf management
Enable ntp
(config)#ntp master vrf management
Configure the node as NTP master
(config)#ntp master stratum 1 vrf management
Configure the ntp stratum level as 1 indicating that it is using local clock
(config)#ntp allow 10.12.20.6 vrf management
Configure ntp client address in the ntp allow list
(config)#commit
Commit the candidate configuration to the running configuration
(config)#exit
Exit configure mode
NTP Client
 
#configure terminal
Enter configure mode.
(config)#feature ntp vrf management
Enable feature ntp.
(config)#ntp enable vrf management
Enable ntp
(config)#ntp server 10.12.20.5 vrf management
Configure ntp server address for the sync to happen
(config)#commit
 
 
Commit the candidate configuration to the running configuration
(config)#exit
Exit Configure mode
Validation
Check the local clock synchronization in the NTP Master as mentioned below:
VTEP1#show ntp peer-status
remote refid st t when poll reach delay offset jitter
==============================================================================
*127.127.1.0 .LOCL. 1 l 59 64 377 0.000 0.000 0.000
 
Check the ntp client synchronization status as mentioned below:
#show ntp peer-status
Total peers : 1
* - selected for sync, + - peer mode(active),
- - peer mode(passive), = - polled in client mode,
x - source false ticker
remote refid st t when poll reach delay offset jitter
==============================================================================
*10.12.20.5 LOCAL(0) 2 u 4 16 377 0.137 -0.030 0.004
 
Configuration of User Defined VRF
NTP Master
 
#configure terminal
Enter configure mode
(config)#feature ntp vrf vrf1
Enable feature ntp
(config)#ntp enable vrf vrf1
Enable ntp
(config)#ntp master vrf vrf1
Configure the node as NTP master
(config)#ntp master stratum 1 vrf vrf1
Configure the ntp stratum level as 1 indicating that it is using local clock
(config)#ntp allow 192.168.2.0 mask 255.255.255.0 vrf vrf1
Configure ipv4 ntp client address in the ntp allow list
(config) ntp allow 2001:: mask 64 vrf vrf1
Configure ipv6 ntp client address in the ntp allow list
(config)#commit
Commit the candidate configuration to the running configuration
(config)#exit
Exit configure mode
NTP Client
 
#configure terminal
Enter configure mode.
(config)#feature ntp vrf vrf1
Enable feature ntp.
(config)#ntp enable vrf vrf1
Enable ntp
(config)#ntp server 192.168.2.2 vrf vrf1
Configure ntp server address for the sync to happen
(config)#ntp server 2001::2 vrf vrf1
 
(config)#commit
Commit the candidate configuration to the running
(config)#exit
Exit Configure mode
 
Validation
Check the local clock synchronization in the NTP Master as mentioned below:
ntpmaster#sh ntp peer-status
remote refid st t when poll reach delay offset jitter
==============================================================================
*127.127.1.0 .LOCL. 1 l 60 64 377 0.000 0.000 0.000
 
Check the ntp client synchronization status as mentioned below:
Ntpclient1#sh ntp peer-status
Total peers : 2
* - selected for sync, + - peer mode(active),
- - peer mode(passive), = - polled in client mode,
x - source false ticker
remote refid st t when poll reach delay offset jitter
==============================================================================
*192.168.2.2 LOCAL(0) 2 u 23 64 377 0.429 0.006 0.042
+2001::2 LOCAL(0) 2 u 35 64 377 0.440 -0.007 0.033
Synchronization of more than one NTP clients with the NTP Master
In the below section, check the Synchronization of more than one NTP clients with the NTP Master using Subnet definition on the NTP Master.
Topology
The procedures in this section use the topology as mentioned below:
Setup consists of three nodes. One node acting as NTP Master and the other two nodes acting as NTP Clients.
Synchronization of more than one NTP clients with NTP Master using subnet definition
Configuration of VRF Management
NTP Master
 
#configure terminal
Enter configure mode
(config)# feature ntp vrf management
Enable feature ntp
(config)# ntp enable vrf management
Enable ntp
(config)# ntp master vrf management
Configure the node as NTP master
(config)# ntp master stratum 1 vrf management
Configure the ntp stratum level as 1 indicating that it is using local clock
(config)# ntp allow 10.12.20.6 mask 255.255.255.0 vrf management
Configure the mask in the ntp allow list
(config)#commit
 
 
Commit the candidate configuration to the running configuration
(config)# exit
Exit configure mode
NTP Client1
 
#configure terminal
Enter configure mode.
(config)# feature ntp vrf management
Enable feature ntp.
(config)# ntp enable vrf management
Enable ntp
(config)# ntp server 10.12.20.5 vrf management
Configure ntp server address for the sync to happen
(config)#commit
 
 
Commit the candidate configuration to the running configuration
(config)# exit
Exit Configure mode
NTP Client2
 
#configure terminal
Enter configure mode.
(config)# feature ntp vrf management
Enable feature ntp.
(config)# ntp enable vrf management
Enable ntp
(config)# ntp server 10.12.20.5 vrf management
Configure ntp server address for the sync to happen
(config)#commit
 
 
Commit the candidate configuration to the running configuration
(config)# exit
Exit Configure mode
Validation
Check the local clock synchronization in the NTP Master as mentioned below:
VTEP1#show ntp peer-status
remote refid st t when poll reach delay offset jitter
==============================================================================
*127.127.1.0 .LOCL. 1 l 59 64 377 0.000 0.000 0.000
 
Check the ntp client1 synchronization status as mentioned below :
#show ntp peer-status
Total peers : 1
* - selected for sync, + - peer mode(active),
- - peer mode(passive), = - polled in client mode,
x - source false ticker
remote refid st t when poll reach delay offset jitter
==============================================================================
*10.12.20.5 LOCAL(0) 2 u 8 32 377 0.153 -0.053 0.020
 
Check the ntp client2 synchronization status as mentioned below:
VTEP2#show ntp peer-status
Total peers : 1
* - selected for sync, + - peer mode(active),
- - peer mode(passive), = - polled in client mode,
x - source false ticker
remote refid st t when poll reach delay offset jitter
==============================================================================
*10.12.20.5 LOCAL(0) 2 u 14 16 377 0.150 -0.686 0.034
 
Configuration of User Defined VRF
NTP Master
 
#configure terminal
Enter configure mode
(config)# feature ntp vrf vrf1
Enable feature ntp
(config)# ntp enable vrf vrf1
Enable ntp
(config)# ntp master vrf vrf1
Configure the node as NTP master
(config)# ntp master stratum 1 vrf vrf1
Configure the ntp stratum level as 1 indicating that it is using local clock
(config)# ntp allow 192.168.2.0 mask 255.255.255.0 vrf vrf1
Configure the mask in the ntp allow list for ipv4
(config)# ntp allow 192.168.3.0 mask 255.255.255.0 vrf vrf1
Configure the mask in the ntp allow list for ipv4
(config)# ntp allow 2001:: mask 64 vrf vrf1
Configure the mask in the ntp allow list for ipv6
(config)# ntp allow 5001:: mask 64 vrf vrf1
Configure the mask in the ntp allow list for ipv6
(config)#commit
Commit the candidate configuration to the running
(config)# exit
Exit configure mode
NTP Client1
 
#configure terminal
Enter configure mode.
(config)# feature ntp vrf vrf1
Enable feature ntp.
(config)# ntp enable vrf vrf1
Enable ntp
(config)# ntp server 192.168.2.2 vrf vrf1
Configure ipv4 ntp server address for the sync to happen
(config)# ntp server 2001::2 vrf vrf1
Configure ipv6 ntp server address for the sync to happen
(config)#commit
Commit the candidate configuration to the running
(config)# exit
Exit Configure mode
NTP Client2
 
#configure terminal
Enter configure mode.
(config)# feature ntp vrf vrf1
Enable feature ntp.
(config)# ntp enable vrf vrf1
Enable ntp
(config)# ntp server 192.168.3.2 vrf vrf1
Configure ipv4 ntp server address for the sync to happen
(config)# ntp server 5001::2 vrf vrf1
Configure ipv6 ntp server address for the sync to happen
(config)#commit
Commit the candidate configuration to the running
(config)# exit
Exit Configure mode
Validation
Check the local clock synchronization in the NTP Master as mentioned below:
ntpmaster#show ntp peer-status
remote refid st t when poll reach delay offset jitter
==============================================================================
*127.127.1.0 .LOCL. 1 l 46 64 377 0.000 0.000 0.000
 
Check the ntp client1 synchronization status as mentioned below:
ntpclient-7012#show ntp peer-status
Total peers : 2
* - selected for sync, + - peer mode(active),
- - peer mode(passive), = - polled in client mode,
x - source false ticker
remote refid st t when poll reach delay offset jitter
==============================================================================
*192.168.2.2 LOCAL(0) 2 u 54 64 377 0.410 0.088 0.026
+2001::2 LOCAL(0) 2 u 54 64 377 0.453 0.019 0.206
Check the ntp client2 synchronization status as mentioned below:
ntpclient-7025#show ntp peer-status
Total peers : 2
* - selected for sync, + - peer mode(active),qw
- - peer mode(passive), = - polled in client mode,
x - source false ticker
remote refid st t when poll reach delay offset jitter
==============================================================================
*192.168.3.2 LOCAL(0) 2 u 30 64 377 0.476 -0.021 0.033
+5001::2 LOCAL(0) 2 u 34 64 377 0.451 -0.060 0.040
Synchronization with Authentication
In the below section, check the synchronization of NTP Master and NTP Client with Authentication.
Topology
The procedures in this section use the topology as mentioned below:
Setup consists of three nodes. One node acting as NTP Master and the other two nodes acting as NTP Clients.
Synchronization of NTP Master and NTP Clients using authentication
Configuration of VRF Management
NTP Master
 
#configure terminal
Enter configure mode
(config)# feature ntp vrf management
Enable feature ntp
(config)# ntp enable vrf management
Enable ntp
(config)# ntp master vrf management
Configure the node as NTP master
(config)# ntp master stratum 1 vrf management
Configure the ntp stratum level as 1 indicating that it is using local clock
(config)# ntp authenticate vrf management
Configure ntp server for authentication
(config)# ntp authentication-key 65 md5 test123 vrf management
Configure ntp authentication key with password
(config)# ntp trusted-key 65 vrf management
Configure ntp trusted key
(config)# ntp allow 10.12.20.6 mask 255.255.255.0 vrf management
Configure the mask in the ntp allow list
(config)#commit
Commit the configuration
(config)# exit
Exit configure mode
NTP Client1
 
#configure terminal
Enter configure mode.
(config)# feature ntp vrf management
Enable feature ntp.
(config)# ntp enable vrf management
Enable ntp
(config)# ntp authenticate vrf management
Configure ntp client for authentication
(config)# ntp authentication-key 65 md5 test123 vrf management
Configure ntp authentication key with password
(config)# ntp trusted-key 65 vrf management
Configure ntp trusted key
(config)# ntp server 10.12.20.5 key 65 vrf management
Configure ntp server address for the sync to happen with authentication key
(config)#commit
Commit the configuration
(config)# exit
Exit Configure mode
NTP Client2
 
#configure terminal
Enter configure mode.
(config)# feature ntp vrf management
Enable feature ntp.
(config)# ntp enable vrf management
Enable ntp
(config)# ntp authenticate vrf management
Configure ntp client for authentication
(config)# ntp authentication-key 65 md5 test123 vrf management
Configure ntp authentication key with password
(config)# ntp trusted-key 65 vrf management
Configure ntp trusted key
(config)# ntp server 10.12.20.5 key 65 vrf management
Configure ntp server address for the sync to happen with authentication key
(config)#commit
Commit the configuration
(config)# exit
Exit Configure mode
Validation
Check the local clock synchronization in the NTP Master as mentioned below:
VTEP1#show ntp peer-status
remote refid st t when poll reach delay offset jitter
==============================================================================
*127.127.1.0 .LOCL. 1 l 64 64 377 0.000 0.000 0.000
Check the ntp client1 synchronization status as mentioned below:
#show ntp peer-status
Total peers : 1
* - selected for sync, + - peer mode(active),
- - peer mode(passive), = - polled in client mode,
x - source false ticker
remote refid st t when poll reach delay offset jitter
==============================================================================
*10.12.20.5 LOCAL(0) 2 u 12 64 377 0.185 0.002 0.006
 
Check the ntp client2 synchronization status as mentioned below :
VTEP2#show ntp peer-status
Total peers : 1
* - selected for sync, + - peer mode(active),
- - peer mode(passive), = - polled in client mode,
x - source false ticker
remote refid st t when poll reach delay offset jitter
==============================================================================
*10.12.20.5 LOCAL(0) 2 u 16 32 377 0.175 -0.360 0.226
Configuration of User Defined VRF
NTP Master
 
#configure terminal
Enter configure mode
(config)# feature ntp vrf vrf1
Enable feature ntp
(config)# ntp enable vrf vrf1
Enable ntp
(config)# ntp master vrf vrf1
Configure the node as NTP master
(config)# ntp master stratum 1 vrf vrf1
Configure the ntp stratum level as 1 indicating that it is using local clock
(config)# ntp authenticate vrf vrf1
Configure ntp server for authentication
(config)# ntp authentication-key 1 md5 cisco 7 vrf vrf1
Configure ntp authentication key with password
(config)# ntp trusted-key 1 vrf vrf1
Configure ntp trusted key
(config)# ntp request-key 1 vrf vrf1
Configure request key
(config)# ntp allow 192.168.2.0 mask 255.255.255.0 vrf vrf1
Configure the mask in the ntp allow list for ipv4
(config)# ntp allow 2001:: mask 64 vrf vrf1
Configure the mask in the ntp a6llow list for ipv6
(config)# ntp allow 192.168.3.0 mask 255.255.255.0 vrf vrf1
Configure the mask in the ntp allow list for ipv4
(config)# ntp allow 5001:: mask 64 vrf vrf1
Configure the mask in the ntp allow list for ipv6
(config)#commit
Commit the configuration
(config)# exit
Exit configure mode
NTP Client1
 
#configure terminal
Enter configure mode.
(config)# feature ntp vrf vrf1
Enable feature ntp.
(config)# ntp enable vrf vrf1
Enable ntp
(config)# ntp authenticate vrf vrf1
Configure ntp client for authentication
(config)# ntp authentication-key 1 md5 cisco vrf vrf1
Configure ntp authentication key with password
(config)# ntp request-key 1 vrf vrf1
Configure request key
(config)# ntp trusted-key 1 vrf vrf1
Configure ntp trusted key
(config)# ntp server 192.168.2.2 key 1 vrf vrf1
Configure ntp server address for the sync to happen with authentication key
(config)#commit
Commit the configuration
(config)# exit
Exit Configure mode
 
NTP Client2
 
#configure terminal
Enter configure mode.
(config)# feature ntp vrf vrf1
Enable feature ntp.
(config)# ntp enable vrf vrf1
Enable ntp
(config)# ntp authenticate vrf vrf1
Configure ntp client for authentication
(config)# ntp authentication-key 1 md5 cisco vrf vrf1
Configure ntp authentication key with password
(config)# ntp request-key 1 vrf vrf1
Configure request key
(config)# ntp trusted-key 1 vrf vrf1
Configure ntp trusted key
(config)# ntp server 192.168.3.2 key 1 vrf vrf1
Configure ntp server address for the sync to happen with authentication key
(config)#commit
Commit the configuration
(config)# exit
Exit Configure mode
 
Validation
Check the local clock synchronization in the NTP Master as mentioned below:
VTEP1#show ntp peer-status
remote refid st t when poll reach delay offset jitter
==============================================================================
*127.127.1.0 .LOCL. 1 l 50 64 377 0.000 0.000 0.000
 
Check the ntp client1 synchronization status as mentioned below:
#show ntp peer-status
Total peers : 2
* - selected for sync, + - peer mode(active),
- - peer mode(passive), = - polled in client mode,
x - source false ticker
remote refid st t when poll reach delay offset jitter
==============================================================================
*192.168.2.2 LOCAL(0) 2 u 43 64 377 0.407 -0.018 0.034
+2001::2 LOCAL(0) 2 u 22 64 377 0.432 -0.031 0.063
 
Check the ntp client2 synchronization status as mentioned below:
VTEP2#show ntp peer-status
Total peers : 2
* - selected for sync, + - peer mode(active),
- - peer mode(passive), = - polled in client mode,
x - source false ticker
remote refid st t when poll reach delay offset jitter
==============================================================================
+192.168.3.2 LOCAL(0) 2 u 51 64 377 0.443 0.007 0.032
*5001::2 LOCAL(0) 2 u 49 64 377 0.471 -0.034 0.065
 
Synchronization of NTP Server and NTP Clients with NTP ACL
The command nomodify ntp acl signifies NTP Clients must be denied ntpq(1) and ntpdc(1) queries which attempt to modify the state of the server (i.e., run time reconfiguration).Queries which return information shall be permitted.
The command noquery ntp acl signifies Deny ntpq(1) and ntpdc(1) queries by NTP Clients. But Time service shall not be affected.
The command nopeer ntp acl signifies NTP Clients shall be denied access if unauthenticated packets which would result in mobilizing a new association is sent.
The command notrap ntp acl signifies NTP Clients shall be declined to provide mode 6 control message trap service to matching hosts. The trap service is a sub-system of the ntpq(1) control message protocol which is intended for use by remote event logging programs.
The command KoD ntp acl signifies When an access violation happens by NTP Clients, the server must send the KoD (kiss-o'-death) packets. KoD packets are rate limited to no more than one per second. If another KoD packet occurs within one second after the last one, the packet is dropped.
Topology
The procedures in this section use the topology as mentioned below:
Setup consists of three nodes. One node acting as NTP Master and the other two nodes acting as NTP Clients.
Synchronization of NTP Master and NTP Clients with NTP ACL
Configuration of VRF Management
NTP Master
 
#configure terminal
Enter configure mode
(config)# feature ntp vrf management
Enable feature ntp
(config)# ntp enable vrf management
Enable ntp
(config)# ntp master vrf management
Configure the node as NTP master
(config)# ntp master stratum 1 vrf management
Configure the ntp stratum level as 1 indicating that it is using local clock
(config)# ntp authenticate vrf management
Configure ntp server for authentication
(config)# ntp authentication-key 65 md5 test123 vrf management
Configure ntp authentication key with password
(config)# ntp trusted-key 65 vrf management
Configure ntp trusted key
(config)# ntp allow 10.12.20.6 mask 255.255.255.0 nomodify vrf management
Configure the ntp acl nomodify in the ntp allow list
(config)# ntp allow 10.12.20.6 mask 255.255.255.0 noquery vrf management
Configure the ntp acl noquery in the ntp allow list
(config)# ntp allow 10.12.20.6 mask 255.255.255.0 nopeer vrf management
Configure the ntp acl nopeer in the ntp allow list
(config)# ntp allow 10.12.20.6 mask 255.255.255.0 notrap vrf management
Configure the ntp acl notrap in the ntp allow list
(config)# ntp allow 10.12.20.6 mask 255.255.255.0 kod vrf management
Configure the ntp acl KoD in the ntp allow list
(config)#commit
Commit the configuration
(config)# exit
Exit configure mode
NTP Client1
 
#configure terminal
Enter configure mode.
(config)# feature ntp vrf management
Enable feature ntp.
(config)# ntp enable vrf management
Enable ntp
(config)# ntp authenticate vrf management
Configure ntp client for authentication
(config)# ntp authentication-key 65 md5 test123 vrf management
Configure ntp authentication key with password
(config)# ntp trusted-key 65 vrf management
Configure ntp trusted key
(config)# ntp server 10.12.20.5 key 65 vrf management
Configure ntp server address for the sync to happen with authentication key
(config)#commit
Commit the configuration
(config)# exit
Exit Configure mode
NTP Client2
 
#configure terminal
Enter configure mode.
(config)# feature ntp vrf management
Enable feature ntp.
(config)# ntp enable vrf management
Enable ntp
(config)# ntp authenticate vrf management
Configure ntp client for authentication
(config)# ntp authentication-key 65 md5 test123 vrf management
Configure ntp authentication key with password
(config)# ntp trusted-key 65 vrf management
Configure ntp trusted key
(config)# ntp server 10.12.20.5 key 65 vrf management
Configure ntp server address for the sync to happen with authentication key
(config)#commit
Commit the configuration
(config)# exit
Exit Configure mode
Validation
Normal Time synchronization is not affected.
Check the local clock synchronization in the NTP Master as mentioned below:
VTEP1#show ntp peer-status
remote refid st t when poll reach delay offset jitter
==============================================================================
*127.127.1.0 .LOCL. 1 l 40 64 377 0.000 0.000 0.000
VTEP1#
Check the ntp client1 synchronization status as mentioned below:
#show ntp peer-status
Total peers : 1
* - selected for sync, + - peer mode(active),
- - peer mode(passive), = - polled in client mode,
x - source false ticker
remote refid st t when poll reach delay offset jitter
==============================================================================
*10.12.20.5 LOCAL(0) 2 u 13 16 377 0.180 0.019 0.013
Check the ntp client2 synchronization status as mentioned below:
VTEP2#show ntp peer-status
Total peers : 1
* - selected for sync, + - peer mode(active),
- - peer mode(passive), = - polled in client mode,
x - source false ticker
remote refid st t when poll reach delay offset jitter
==============================================================================
*10.12.20.5 LOCAL(0) 2 u 15 16 377 0.185 -0.018 0.017
Configuration of User Defined VRF
NTP Master
 
#configure terminal
Enter configure mode
(config)# feature ntp vrf vrf1
Enable feature ntp
(config)# ntp enable vrf vrf1
Enable ntp
(config)# ntp master vrf vrf1
Configure the node as NTP master
(config)# ntp master stratum 1 vrf vrf1
Configure the ntp stratum level as 1 indicating that it is using local clock
(config)# ntp authenticate vrf vrf1
Configure ntp server for authentication
(config)# ntp authentication-key 1 md5 cisco vrf vrf1
Configure ntp authentication key with password
(config)# ntp trusted-key 1 vrf vrf1
Configure ntp trusted key
(config)# ntp request-key 1 vrf vrf1
Configure ntp request key
(config)# ntp allow 192.168.2.0 mask 255.255.255.0 nomodify vrf vrf1
Configure the ntp acl nomodify in the ntp allow list
(config)# ntp allow 192.168.2.0 mask 255.255.255.0 noquery vrf vrf1
Configure the ntp acl noquery in the ntp allow list
(config)# ntp allow 192.168.2.0 mask 255.255.255.0 nopeer vrf vrf1
Configure the ntp acl nopeer in the ntp allow list
(config)# ntp allow 192.168.2.0 mask 255.255.255.0 notrap vrf vrf1
Configure the ntp acl notrap in the ntp allow list
(config)# ntp allow 10.12.20.6+-192.168.2.0 mask 255.255.255.0 kod vrf vrf1
Configure the ntp acl KoD in the ntp allow list
(config)#commit
Commit the configuration
(config)# exit
Exit configure mode
 
NTP Client1
 
#configure terminal
Enter configure mode.
(config)# feature ntp vrf vrf1
Enable feature ntp.
(config)# ntp enable vrf vrf1
Enable ntp
(config)# ntp authenticate vrf vrf1
Configure ntp client for authentication
(config)# ntp authentication-key 1 md5 cisco vrf vrf1
Configure ntp authentication key with password
(config)# ntp trusted-key 1 vrf vrf1
Configure ntp trusted key
(config)# ntp request-key 1 vrf vrf1
Configure ntp trusted key
(config)# ntp server 192.168.2.2 key 1 vrf vrf1
Configure ntp server address for the sync to happen with authentication key
(config)#commit
Commit the configuration
(config)# exit
Exit Configure mode
NTP Client2
 
#configure terminal
Enter configure mode.
(config)# feature ntp vrf vrf1
Enable feature ntp.
(config)# ntp enable vrf vrf1
Enable ntp
(config)# ntp authenticate vrf vrf1
Configure ntp client for authentication
(config)# ntp authentication-key 1 md5 cisco vrf vrf1
Configure ntp authentication key with password
(config)# ntp trusted-key 1 vrf vrf1
Configure ntp trusted key
(config)# ntp request-key 1 vrf vrf1
Configure ntp trusted key
(config)# ntp server 192.168.3.2 key 1 vrf vrf1
Configure ntp server address for the sync to happen with authentication key
(config)#commit
Commit the configuration
(config)# exit
Exit Configure mode
Validation
Normal Time synchronization is not affected.
Check the local clock synchronization in the NTP Master as mentioned below:
VTEP1#show ntp peer-status
remote refid st t when poll reach delay offset jitter
==============================================================================
*127.127.1.0 .LOCL. 1 l 40 64 377 0.000 0.000 0.000
VTEP1#
Check the ntp client1 synchronization status as mentioned below:
#show ntp peer-status
Total peers : 1
* - selected for sync, + - peer mode(active),
- - peer mode(passive), = - polled in client mode,
x - source false ticker
remote refid st t when poll reach delay offset jitter
==============================================================================
*10.12.20.5 LOCAL(0) 2 u 13 16 377 0.180 0.019 0.013
Check the ntp client2 synchronization status as mentioned below:
VTEP2#show ntp peer-status
Total peers : 1
* - selected for sync, + - peer mode(active),
- - peer mode(passive), = - polled in client mode,
x - source false ticker
remote refid st t when poll reach delay offset jitter
==============================================================================
*10.12.20.5 LOCAL(0) 2 u 15 16 377 0.185 -0.018 0.017
 
Synchronization of NTP Server and NTP Clients with NTP ACL configured as noserve
The command noserve ntp acl signifies NTP Clients shall be denied all packets except ntpq(1) and ntpdc(1) queries.
Topology
The procedures in this section use the topology as mentioned below:
Setup consists of three nodes. One node acting as NTP Master and the other two nodes acting as NTP Clients.
Synchronization of NTP Master and NTP Clients with NTP ACL as noserve
Configuration of VRF Management
NTP Master
 
#configure terminal
Enter configure mode
(config)# feature ntp vrf management
Enable feature ntp
(config)# ntp enable vrf management
Enable ntp
(config)# ntp master vrf management
Configure the node as NTP master
(config)# ntp master stratum 1 vrf management
Configure the ntp stratum level as 1 indicating that it is using local clock
(config)# ntp authenticate vrf management
Configure ntp server for authentication
(config)# ntp authentication-key 65 md5 test123 vrf management
Configure ntp authentication key with password
(config)# ntp trusted-key 65 vrf management
Configure ntp trusted key
(config)# ntp allow 10.12.20.6 mask 255.255.255.0 noserve vrf management
Configure the ntp acl noserve in the ntp allow list
(config)#commit
Commit the configuration
(config)# exit
Exit configure mode
NTP Client1
 
#configure terminal
Enter configure mode.
(config)#feature ntp vrf management
Enable feature ntp.
(config)#ntp enable vrf management
Enable ntp
(config)#ntp authenticate vrf management
Configure ntp client for authentication
(config)#ntp authentication-key 65 md5 test123 vrf management
Configure ntp authentication key with password
(config)#ntp trusted-key 65 vrf management
Configure ntp trusted key
(config)#ntp server 10.12.20.5 key 65 vrf management
Configure ntp server address for the sync to happen with authentication key
(config)#commit
Commit the configuration
(config)#exit
Exit Configure mode
NTP Client2
 
#configure terminal
Enter configure mode.
(config)#feature ntp vrf management
Enable feature ntp.
(config)#ntp enable vrf management
Enable ntp
(config)#ntp authenticate vrf management
Configure ntp client for authentication
(config)#ntp authentication-key 65 md5 test123 vrf management
Configure ntp authentication key with password
(config)#ntp trusted-key 65 vrf management
Configure ntp trusted key
(config)#ntp server 10.12.20.5 key 65 vrf management
Configure ntp server address for the sync to happen with authentication key
(config)#commit
Commit the configuration
(config)#exit
Exit Configure mode
Validation
Check that with NTP acl configured as noserve, Normal Time synchronization is affected and there is no synchronization.
Check the local clock synchronization in the NTP Master as mentioned below:
VTEP1#show ntp peer-status
remote refid st t when poll reach delay offset jitter
==============================================================================
*127.127.1.0 .LOCL. 1 l 41 64 377 0.000 0.000 0.000
 
Check the ntp client1 synchronization status as mentioned below:
#show ntp peer-status
Total peers : 1
* - selected for sync, + - peer mode(active),
- - peer mode(passive), = - polled in client mode,
x - source false ticker
remote refid st t when poll reach delay offset jitter
==============================================================================
10.12.20.5 .INIT. 16 u - 64 0 0.000 0.000 0.000
 
Check the ntp client2 synchronization status as mentioned below:
VTEP2#show ntp peer-status
Total peers : 1
* - selected for sync, + - peer mode(active),
- - peer mode(passive), = - polled in client mode,
x - source false ticker
remote refid st t when poll reach delay offset jitter
==============================================================================
10.12.20.5 .INIT. 16 u - 64 0 0.000 0.000 0.000
Configuration of User Defined VRF
NTP Master
 
#configure terminal
Enter configure mode
(config)# feature ntp vrf vrf1
Enable feature ntp
(config)# ntp enable vrf vrf1
Enable ntp
(config)# ntp master vrf vrf1
Configure the node as NTP master
(config)# ntp master stratum 1 vrf vrf1
Configure the ntp stratum level as 1 indicating that it is using local clock
(config)# ntp authenticate vrf vrf1
Configure ntp server for authentication
(config)# ntp authentication-key 65 md5 test123 vrf vrf1
Configure ntp authentication key with password
(config)# ntp trusted-key 65 vrf vrf1
Configure ntp trusted key
(config)# ntp allow 10.12.20.6 mask 255.255.255.0 noserve vrf vrf1
Configure the ntp acl noserve in the ntp allow list
(config)#commit
Commit the configuration
(config)# exit
Exit configure mode
 
NTP Client1
 
#configure terminal
Enter configure mode
(config)#feature ntp vrf vrf1
Enable feature ntp
(config)#ntp enable vrf vrf1
Enable ntp
(config)#ntp authenticate vrf vrf1
Configure ntp client for authentication
(config)#ntp authentication-key 65 md5 test123 vrf vrf1
Configure ntp authentication key with password
(config)#ntp trusted-key 65 vrf vrf1
Configure ntp trusted key
(config)#ntp server 10.12.20.5 key 65 vrf vrf1
Configure ntp server address for the sync to happen with authentication key
(config)#commit
Commit the configuration
(config)#exit
Exit Configure mode
NTP Client2
 
#configure terminal
Enter configure mode.
(config)#feature ntp vrf vrf1
Enable feature ntp.
(config)#ntp enable vrf vrf1
Enable ntp
(config)#ntp authenticate vrf vrf1
Configure ntp client for authentication
(config)#ntp authentication-key 65 md5 test123 vrf vrf1
Configure ntp authentication key with password
(config)#ntp trusted-key 65 vrf vrf1
Configure ntp trusted key
(config)#ntp server 10.12.20.5 key 65 vrf vrf1
Configure ntp server address for the sync to happen with authentication key
(config)#commit
Commit the configuration
(config)#exit
Exit Configure mode
Validation
Check that with NTP acl configured as noserve, Normal Time synchronization is affected and there is no synchronization.
Check the local clock synchronization in the NTP Master as mentioned below:
VTEP1#show ntp peer-status
remote refid st t when poll reach delay offset jitter
==============================================================================
*127.127.1.0 .LOCL. 1 l 41 64 377 0.000 0.000 0.000
 
Check the ntp client1 synchronization status as mentioned below:
#show ntp peer-status
Total peers : 1
* - selected for sync, + - peer mode(active),
- - peer mode(passive), = - polled in client mode,
x - source false ticker
remote refid st t when poll reach delay offset jitter
==============================================================================
10.12.20.5 .INIT. 16 u - 64 0 0.000 0.000 0.000
 
Check the ntp client2 synchronization status as mentioned below:
VTEP2#show ntp peer-status
Total peers : 1
* - selected for sync, + - peer mode(active),
- - peer mode(passive), = - polled in client mode,
x - source false ticker
remote refid st t when poll reach delay offset jitter
==============================================================================
10.12.20.5 .INIT. 16 u - 64 0 0.000 0.000 0.000
 
Synchronization of NTP Client with Stratum 2 NTP Master
In the below section, check Synchronization of NTP Client with Stratum 2 NTP Master.
Topology
The procedures in this section use the topology as mentioned below:
Setup consists of three nodes. First node acting as Stratum 1 NTP Master, Second node acting as Stratum 2 NTP master and the third node acting as NTP client.
Synchronization of Stadium 2 NTP Master with NTP Client
Configuration of Management VRF
Stratum 1 NTP Master
 
#configure terminal
Enter configure mode
(config)#feature ntp vrf management
Enable feature ntp
(config)#ntp enable vrf management
Enable ntp
(config)#ntp master vrf management
Configure the node as NTP master
(config)#ntp master stratum 1 vrf management
Configure the ntp stratum level as 1 indicating that it is using local clock
(config)#ntp allow 10.12.20.5 vrf management
Configure the ntp client ip address in the ntp allow list
(config)#commit
Commit the configuration
(config)#exit
Exit configure mode
Stratum 2 NTP Server/NTP Client
 
#configure terminal
Enter configure mode.
(config)#feature ntp vrf management
Enable feature ntp.
(config)#ntp enable vrf management
Enable ntp
(config)#ntp master vrf management
Configure the node as NTP Master
(config)#ntp master stratum 2 vrf management
Configure the node as stratum 2 ntp master
(config)#ntp allow 10.12.20.6 vrf management
Configure NTP client ip address in the ntp allow list
(config)#ntp server 10.12.20.7 vrf management
Configure the stratum 1 NTP master ip address for time synchronization
(config)#commit
Commit the configuration
(config)#exit
Exit Configure mode
NTP Client
 
#configure terminal
Enter configure mode.
(config)#feature ntp vrf management
Enable feature ntp.
(config)#ntp enable vrf management
Enable ntp
(config)#ntp server 10.12.20.5 vrf management
Configure ntp server address for the sync to happen
(config)#commit
Commit the configuration
(config)#exit
Exit Configure mode
Validation
Check that NTP Client successfully synchronizes the time with stratum 2 NTP Master.
Check the local clock synchronization in the Stratum 1 NTP Master as mentioned below:
VTEP2#show ntp peer-status
remote refid st t when poll reach delay offset jitter
==============================================================================
*127.127.1.0 .LOCL. 1 l 22 64 377 0.000 0.000 0.000
 
Check the Stratum 2 NTP Master/NTP client synchronization status as mentioned below:
VTEP1#show ntp peer-status
Total peers : 1
* - selected for sync, + - peer mode(active),
- - peer mode(passive), = - polled in client mode,
x - source false ticker
remote refid st t when poll reach delay offset jitter
==============================================================================
*10.12.20.7 LOCAL(0) 2 u 33 64 377 0.145 0.010 0.009
127.127.1.0 .LOCL. 2 l 110m 64 0 0.000 0.000 0.000
 
Check the NTP Client synchronization status as mentioned below:
#show ntp peer-status
Total peers : 1
* - selected for sync, + - peer mode(active),
- - peer mode(passive), = - polled in client mode,
x - source false ticker
remote refid st t when poll reach delay offset jitter
==============================================================================
*10.12.20.5 10.12.20.7 3 u 16 64 377 0.137 -2.596 0.235
Configuration of User Defined VRF
Stratum 1 NTP Master
 
#configure terminal
Enter configure mode
(config)#feature ntp vrf vrf1
Enable feature ntp
(config)#ntp enable vrf vrf1
Enable ntp
(config)#ntp master vrf vrf1
Configure the node as NTP master
(config)#ntp master stratum 1 vrf vrf1
Configure the ntp stratum level as 1 indicating that it is using local clock
(config)#ntp allow 192.168.3.0 vrf vrf1
Configure the ntp client ip address in the ntp allow list
(config)#commit
Commit the configuration
(config)#exit
Exit configure mode
 
Stratum 2 NTP Server/NTP Client
 
#configure terminal
Enter configure mode.
(config)#feature ntp vrf vrf1
Enable feature ntp.
(config)#ntp enable vrf vrf1
Enable ntp
(config)#ntp master vrf vrf1
Configure the node as NTP Master
(config)#ntp master stratum 2 vrf vrf1
Configure the node as stratum 2 ntp master
(config)#ntp allow 192.168.3.0 vrf vrf1
Configure NTP client ip address in the ntp allow list
(config)#ntp server 192.168.2.2 vrf vrf1
Configure the stratum 1 NTP master ip address for time synchronization
(config)#commit
Commit the configuration
(config)#exit
Exit Configure mode
NTP Client
 
#configure terminal
Enter configure mode.
(config)#feature ntp vrf vrf1
Enable feature ntp.
(config)#ntp enable vrf vrf1
Enable ntp
(config)#ntp server 192.168.3.2 vrf vrf1
Configure ntp server address for the sync to happen
(config)#commit
Commit the configuration
(config)#exit
Exit Configure mode
Validation
Check that NTP Client successfully synchronizes the time with stratum 2 NTP Master.
Check the local clock synchronization in the Stratum 1 NTP Master as mentioned below:
VTEP2#show ntp peer-status
remote refid st t when poll reach delay offset jitter
==============================================================================
*127.127.1.0 .LOCL. 1 l 22 64 377 0.000 0.000 0.000
 
Check the Stratum 2 NTP Master/NTP client synchronization status as mentioned below:
VTEP1#show ntp peer-status
Total peers : 1
* - selected for sync, + - peer mode(active),
- - peer mode(passive), = - polled in client mode,
x - source false ticker
remote refid st t when poll reach delay offset jitter
==============================================================================
*10.12.20.7 LOCAL(0) 2 u 33 64 377 0.145 0.010 0.009
127.127.1.0 .LOCL. 2 l 110m 64 0 0.000 0.000 0.000
 
Check the NTP Client synchronization status as mentioned below:
#show ntp peer-status
Total peers : 1
* - selected for sync, + - peer mode(active),
- - peer mode(passive), = - polled in client mode,
x - source false ticker
remote refid st t when poll reach delay offset jitter
==============================================================================
*10.12.20.5 10.12.20.7 3 u 16 64 377 0.137 -2.596 0.235