- [Narrator] The Network Time Protocol,
most often called NTP, is simply a protocol
for time synchronization over a network.
While it has many advantages, I find it most useful
for troubleshooting.
When an issue occurs and I'm reviewing the log on a device,
it will show the timestamp for each message.
With NTP that timestamp will be correct
across all of my networking devices,
which makes incident correlation so much simpler.
Not only that, but when syslog messages are generated
and sent, depending on the collecting syslog server,
they can be arranged based on the time stamp
the router assigned to them when they were sent.
If everything across the enterprise is configured
for the same time, then these messages will all be in order.
NTP isn't magic, however.
I still need to set the time zone and tell the router
to observe daylight savings time.
I'm in CST, so it's minus 6 hours from GMT.
The command I enter is, config t clock
timezone CST
minus six
Now, I'll tell it to observe savings time with
clock summer-time CST recurring.
I'll now manually get the time set,
and this is done from enable mode.
Clock set 14:10:10
16th of January 2020.
Now to view this set date and time, I'll use show clock.
A router can actually run in one of a few modes.
When acting as an NTP client, a router will adjust it's time
based on the information supplied by a NTP server.
When acting as a NTP server, a router will supply
the adjustment information over to clients.
When acting as both a client and a server,
it will sync it's time from a server
then hand the sync information to others.
I'll first configure my router as a client
to adjust it's time.
It's a command as simple as config t ntp server
and the address of the server is
192.168.88.1
I then can wait a few seconds,
or sometimes even up to a minute,
for the router to query the server and pull some results.
Verification is easy as show ntp associations.
Which will display configured servers
and the related information they send back.
To check the clock synchronization,
I issue a show ntp status.
Often if you run this immediately after
entering NTP server commands,
it will show that the clock is unsynchronized,
which is normal.
I've seen this process take between five and ten minutes
before it will fully synchronize the system time
and give me a clock is synchronized message.
Believe it or not, this router is also already configured
to be a server.
The previously entered NTP server command
instructs the router to act as an NTP server
once it has synchronized it's own time.
Since the requirement for any router
to act as an NTP server is to have a trusted time source,
it has to be done via either NTP client,
or it can be done by using the NTP master command.
So on this router, if I enter the command config t,
ntp master 2, then it will trust it's current
configured time and start acting as an NTP server.
The number two in the previous command
represents the stratum, which is a way of defining
the quality of the time source.
The lower the number, the more trusted it is.
NTP will save time and energy
once troubleshooting has begun.
So, do yourself a favor and implement it now.