The importance of accurate time on a network reaches so many different things the simplest of which is logging date and time stamps. The practice of keeping all network equipment time synchronized throughout an enterprise network is probably the most basic of task, but is often overlooked or forgotten all together. Depending on the application time can also play an important. Take for example the database replication in a CUCM Voice Cluster where the NTP stratum tolerance is crucial to the overall operation.

The System Clock

The system clock or internal clock sometimes referred to as the Calendar is actually configured or set outside of Global Configuration Mode. The internal clock setting is actually not stored in the running configuration its actually part of the system associated with a battery, and chip. We can set the internal hardware clocking by simply doing the following. 

R1#clock set 14:00:00 may 2014

UTC

Lets start off by configuring the local system clocks timezone along with the applicable UTC offset. In this example it will be for central time which is UTC -6. I also like to make sure and set the appropriate logging, and debugging time stamps.

R1#configure terminal
R1(config)#clock timezone CST -6 0
R1(config)#clock summer-time CST recurring
R1(config)#service timestamps debug datetime msec
R1(config)#service timestamps log datetime localtime
R1(config)#end
R1#

Lets take a look at the current date and time on the router before configuring NTP synchronization.

R1#show clock detail
22:35:22.904 CST Wed Feb 10 2014
Time source is hardware calendar
R1#

Before we can ever consider using a pool of NTP servers for time synchronization we must first configure the router to use DNS name resolution. The power of using a redundant pool of servers is to refer to them by a single name. Lets configure the router R1 for DNS resolution using a couple of Google’s popular open and always available DNS Servers. You can of course use any DNS Servers you like whether they be internal or external depending on your needs. They just need to be able to resolve external DNS such as ntp.pool.org or which ever NTP Time service you choose.

R1#configure terminal
R1(config)#ip name-server 8.8.4.4
R1(config)#ip name-server 8.8.8.8
R1(config)#end
R1#

Now that we have DNS name resolution in place on the router lets make sure we can successfully resolve ntp.pool.org from the router.

R1#ping ntp.pool.org source gi0/0.1
Type escape sequence to abort.
Sending 5, 100-byte ICMP Echos to 64.99.80.30, timeout is 2 seconds:
Packet sent with a source address of 172.16.1.1 
!!!!!
Success rate is 100 percent (5/5), round-trip min/avg/max = 44/44/47 ms
R1#

That looks really good 5 out of 5 on the ICMP packet round trip. Doesn’t get any better than that. At this point were ready to actually configuring the router to synchronize its internal clock with the NTP pool of Servers. This was whole point in configuring domain name resolution on the router to begin with. Now that we can successfully reach the NTP pool of servers by name we can configure the router R1 to synchronize its time with the pool.  

R1#configure terminal
R1(config)#ntp source GigabitEthernet0/0.1
R1(config)#ntp server pool.ntp.org
R1(config)#end
R1#

Now that we finally have time synchronizing with pool.net.org lets take a look at the NTP status as it slowly progresses through the initialization phase. Be patient the synchronization process can take several minutes to complete.

R1#show ntp associations
address               ref clock     st when     poll reach    delay     offset         disp
*~198.60.22.240   .INIT.       1      947   1024 377    21.122 -35.297   1.069
 * sys.peer, #  selected,  +  candidate,  -  outlyer,  x  falseticker,  ~  configured
R1#

Now lets take a look at the overall NTP status after configuring 

R1#show ntp status
Clock is synchronized, stratum 2, reference is 198.60.22.240 
nominal freq is 250.0000 Hz, actual freq is 250.0150 Hz, precision is 2**10
ntp uptime is 17412200 (1/100 of seconds), resolution is 4000
reference time is DA668AEA.5A9FBF70 (22:22:02.354 CST Wed Feb 10 2014)
clock offset is -35.2974 msec, root delay is 36.92 msec
root dispersion is 51.20 msec, peer dispersion is 1.06 msec
loopfilter state is 'CTRL' (Normal Controlled Loop), drift is -0.000060220 s/s
system poll interval is 1024, last update was 849 sec ago.
R1#

Now let’s take a look at the NTP association status

R1#show ntp associations
address                 ref clock     st when    poll reach    delay     offset      disp
*~198.60.22.240    .GPS.       1   947  1024  377    36.922   -35.297   1.069
 * sys.peer,  #  selected,  +  candidate,  -  outlyer,  x  falseticker,  ~  configured
R1#

I hope you found this post on Time helpful and informative. Be sure to let me know what you think by leaving suggestions, and feedback in the comments section below. You can find out more about these and other articles be checking out recent posts and archives. To learn more about me be sure to check out the About page. And as always thanks again for visiting The Packet.