Configuring NTP

The Network Time Protocol (NTP) is used to synchronize the internal clocks of network devices. This is helpful for troubleshooting network problems by correlating events on different network devices using, for example, Syslog messages. NTP provides the switch with a mechanism to accurately update its clock to be consistent with the clocks of other network devices within a precision of one millisecond. NTP uses User Datagram Protocol (UDP) to communicate across the network.

To configure the NTP server, use the following command:

Reference

Command

[no] ntp <ip4addr | ip6addr >

Description

NTP server configuration

Parameters

IPv4 or v6 Address - Router IP

Mode

CONFIG

Example

pbnoscli# configure terminal 
pbnoscli(config)# ntp 
  <ipaddr>              A.B.C.D
  <ip6addr>             A:B::C:D
pbnoscli(config)# ntp 162.159.200.1
NTP server 162.159.200.1 added to configuration
Restarting ntp-config service...
pbnoscli(config)# 

To display the NTP server information, use the following command:

Reference

Command

show ntp

Description

Show NTP configuration

Parameters

None

Mode

EXEC

Example

pbnoscli# show ntp                                
MGMT_VRF_CONFIG is not present.
synchronised to NTP server (162.159.200.1) at stratum 4 
   time correct to within 15049 ms
   polling server every 64 s
     remote           refid      st t when poll reach   delay   offset  jitter
==============================================================================
*162.159.200.1   10.210.8.4       3 u   25   64  377    1.114  -15031. 151.639
pbnoscli#
pbnoscli# show running-config 
configure terminal
ntp 162.159.200.1
!
interface mgmt
ip address 10.4.4.52/24 gateway 10.4.4.1
!
pbnoscli#