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 (UDPClosed User Datagram Protocol) 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.

The NTP Server and Client functionality explained above 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.

Figure 37. Synchronization of NTP Master and NTP Client

Configuration

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:

Copy
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