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.
Figure 42. Synchronization of Stadium 2 NTP Master with NTP Client
Management VRF Configuration
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:
Use this for Command syntax, and Validation code snippets.
To use:
Insert this snippet where you want the code block to be.
Right click and select convert to text.
Copy the code you want to insert.
Right click on the block and select Edit Code Snippet to open the editor.
Paste the code and click OK in the bottom right.
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:
Use this for Command syntax, and Validation code snippets.
To use:
Insert this snippet where you want the code block to be.
Right click and select convert to text.
Copy the code you want to insert.
Right click on the block and select Edit Code Snippet to open the editor.
Paste the code and click OK in the bottom right.
User Defined VRF Configuration
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 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