So one of the strategies of getting network time protocols said that correctly
is to have a good game plan.
So here's what I propose we do for our initial game plan.
Let's configure R1 and R2 as top level NTP servers.
Now one way of doing that would be to have them connected to an atomic clock.
In fact, let's talk about stratum for a moment.
So if we are connected to an authoritative time source, for example, an atomic
clock or similar,
that's considered to be stratum zero.
So our router, if we're connected to stratum zero, we would be effectively one WEBVTT X-TIMESTAMP-MAP=LOCAL:00:00:00.000,MPEGTS:900000
So our router, if we're connected to stratum zero, we would be effectively one
worse than that.
That'd be a stratum one.
So if our time source in the cloud was a stratum zero, we would be a stratum
one.
And then if we were a server serving the time down to R3, then R3 would be a
stratum two
because it's learning the time from stratum one.
And that's our three was serving the time down to R5.
R5 because it's learning the time from stratum two would be a stratum three.
And that would just continue every hop along the way.
Think of it like number of hops away from the actual authoritative time source. WEBVTT X-TIMESTAMP-MAP=LOCAL:00:00:00.000,MPEGTS:900000
Think of it like number of hops away from the actual authoritative time source.
So in the lab environment, it helps simulate that.
I'm going to go ahead and force R1 and R2 to be a stratum one server.
And the syntax for that is in configuration mode, use the command NTP space
master
and then the stratum number that you want them to be.
So we want these both to be a stratum number one, for example, a pretty trusted
source for time,
which is to use that command and global config and boom.
Both these routers are going to believe their local time that's currently
configured.
They're going to consider it authoritative.
And once that's set up, we can then use them as servers to pass on the time WEBVTT X-TIMESTAMP-MAP=LOCAL:00:00:00.000,MPEGTS:900000
And once that's set up, we can then use them as servers to pass on the time
down to R3 and R4 and et cetera.
So we're going to start there with making R1 and R2 and NTP stratum level one
time server for NTP.
So we're going to use the lab environment.
I have a lab prepared for you at the tail end of the set of videos.
So for now, I'm going to double click here on the lab topology to take a look
at our topology.
And there it is. Great, great, great.
And most of our work we're going to do from server one, which has console
access to all of these devices in our network.
So we'll go ahead and double click on server one to open that up. WEBVTT X-TIMESTAMP-MAP=LOCAL:00:00:00.000,MPEGTS:900000
So we'll go ahead and double click on server one to open that up.
And we'll give that a moment or two to come up.
Awesome, there it is.
And let's go ahead and start here on router ones.
And with our one selected, let's do a few commands.
Let's do a show NTP status and press enter.
And currently we don't have NTP configured yet.
Let's also show NTP associations.
And again, because we don't have a configured yet, this is not going to show
anything useful.
However, on our one, I do have a debug currently running.
So if we do a show debug press enter, I'm doing debug NTP everything. WEBVTT X-TIMESTAMP-MAP=LOCAL:00:00:00.000,MPEGTS:900000
So if we do a show debug press enter, I'm doing debug NTP everything.
Same as this pen right here, debug NTP all.
So if you don't want to debug on, you can turn off with an undibug all.
I just want the debug on initially so we can see the activity behind the scenes
as NTP jumps to life.
So if we want to make this router an NTP server, we simply go into
configuration mode and type in NTP master.
Space question mark and then specify the stratum number.
So I'm going to use one based on our game plan press enter and take a look at
the debug.
So it's effectively enabled NTP functionality on all of its interfaces. WEBVTT X-TIMESTAMP-MAP=LOCAL:00:00:00.000,MPEGTS:900000
So it's effectively enabled NTP functionality on all of its interfaces.
It's also using a loop address of 127 as reachable.
It can reach itself.
And it's also says I'm synchronized because you just believe the time that it
currently has.
So now if we did a show NTP status and press enter.
So there's our command right there.
And showing the clock is synchronized to itself.
It's a stratum one.
The reference is local means not referring to some other NTP source and has
other details around the offset and the reference time as well as the pole
interval.
So let's go ahead and do the same thing for router two. WEBVTT X-TIMESTAMP-MAP=LOCAL:00:00:00.000,MPEGTS:900000
So let's go ahead and do the same thing for router two.
So we'll go to router two to show NTP status and show NTP associations.
Nothing there.
So we'll go into configuration mode and do an NTP master and we'll go to str
atum of one and we are good to go.
There's no debug on here.
So it doesn't have a whole bunch of details behind the scenes.
But if we now do a show NTP status press center, it says it's synchronized
pretty easy to synchronize to yourself.
Just believe your local clock and we do a show NTP associations and press
center.
It shows we're synchronizing effectively with the 127 to rest. WEBVTT X-TIMESTAMP-MAP=LOCAL:00:00:00.000,MPEGTS:900000
It shows we're synchronizing effectively with the 127 to rest.
That's our loop back.
So here in the address college showing who it's synchronizing with it synchron
izing with itself effectively.
The little till the symbol right there represents that it's reachable.
So it's not unexpected that we could reach ourselves if we are the NTP server.
The reference clock refers to how this server is getting its time and it's
getting it locally.
So if there was an external clock at IP address or GPS or atomic clock that
would be referred to here.
So the ST is in reference to stratum.
So up here it shows a stratum level of one because we're getting the time from
our local system or local clock. WEBVTT X-TIMESTAMP-MAP=LOCAL:00:00:00.000,MPEGTS:900000
our local system or local clock.
Our source of our time is considered to be a stratum level zero.
In this column, the wind column, it shows how many seconds have passed since
the last time the NTP server was pulled by the router.
So even though we're getting the time locally, if we did it again, as far as
the output,
it was now seven seconds ago when it pulled itself effectively for the time.
Here is the pull interval.
Here is the reachability status.
So a 377 means that the NTP server that we're referring to.
In this case, our local clock is reachable. WEBVTT X-TIMESTAMP-MAP=LOCAL:00:00:00.000,MPEGTS:900000
In this case, our local clock is reachable.
The delay represents a round trip delay and because the clock is local on this
router, there is no delay.
And the offset is the time difference in milliseconds between the router's
current time
and the time provided by the NTP server.
And the DASP is a shortcut for dispersion.
It's basically an estimate of the error or the variance in milliseconds between
the router and the NTP server.
So even though we're getting the time directly from our own local clock,
you notice up here it showed 30,937 in change and here it's showing 0.233. WEBVTT X-TIMESTAMP-MAP=LOCAL:00:00:00.000,MPEGTS:900000
you notice up here it showed 30,937 in change and here it's showing 0.233.
And if we did the upper key to show NTP associations again,
after several pulling intervals, the dispersion went from 3000 down to 0.233.
And it looks like that's where it's staying.
And over on the far left, we have a few symbols that might show up as well.
So the asterisk represents the current NTP server that we are synchronized with
.
If there was a pound symbol in front of it that would indicate that the NTP
server is not reliable
and regarding synchronization, it would ignore it.
The plus symbol would indicate that it is a candidate for synchronization,
but it's not currently the primary source for synchronization. WEBVTT X-TIMESTAMP-MAP=LOCAL:00:00:00.000,MPEGTS:900000
but it's not currently the primary source for synchronization.
And until the on the far left represents that it's reachable.
And we can see more detail with that same command by just doing a show NTP
associations detail.
So we'll press center and that gives us even more detail regarding our
associations.
Now NTP is communicated with UTC, universal time coordinated.
And if you want to see the local time difference on your local routers,
you just want to use the command to say, please show the offset.
So right here, for example, on our one and our two, let's go back to our one.
We did a let me do an undibug all. WEBVTT X-TIMESTAMP-MAP=LOCAL:00:00:00.000,MPEGTS:900000
We did a let me do an undibug all.
And if we did a show, flock press center, that's going to show us in UTC time.
If we wanted to change that, we could go into configuration mode and somebody
use the command clock time zone
and then a label and then the offset that you want from UTC.
So I happen to be in the United States using Pacific time zone and based on
when daylight savings is or isn't,
it may be off by an hour, but I'm going to go ahead and do a dash seven.
And now if we do a show clock, it's now showing it as 1333 based on the offset WEBVTT X-TIMESTAMP-MAP=LOCAL:00:00:00.000,MPEGTS:900000
And now if we do a show clock, it's now showing it as 1333 based on the offset
of
dash seven that I just specified.
So I'm going to go ahead and use that command across all the routers and that
way I have that consistency there.
So to do that here in the lab, we can go ahead and click on this little icon up
here and that brings up a little window.
I'll do a paste.
I'll also add a config T on top of that and then end below that and I'll select
all and then I'll unselect our PCs
because they aren't going to understand that command.
So this command is effectively going to set the local time zone on all eight
routers.
So we'll click here on send script and it's done.
Also, just for grants, I'd like to go ahead and look at the clocks on all the WEBVTT X-TIMESTAMP-MAP=LOCAL:00:00:00.000,MPEGTS:900000
Also, just for grants, I'd like to go ahead and look at the clocks on all the
routers.
Let's do a show clock and then we'll go ahead and send that to every router
except for PC one PC seven and PC eight because they're not routers.
We'll click on send script as we look at the time.
So our ones is 1335 are two 1335 are three 1336.
So the time isn't perfectly synchronized across all these routers, but they're
all pretty close.
So for fun, I'm going to take our one and I'm going to set a slightly different
time. WEBVTT X-TIMESTAMP-MAP=LOCAL:00:00:00.000,MPEGTS:900000
time.
So let's do a show clock on our one 1336 and let's go ahead and set this maybe
like 20 minutes off.
So do that with a clock and a space question mark to make sure on the right
track and let's do a 13.
Let's add 20 minutes.
So 1356 0 0 and I'll still say it's October 16th.
Oops, I will type of there and fix that.
So colon 0 0 October 16th 2024.
So I'm just going to modify it by about 20 minutes and press enter.
And if we do a show NTB status, it still thinks it's saying anything still good WEBVTT X-TIMESTAMP-MAP=LOCAL:00:00:00.000,MPEGTS:900000
And if we do a show NTB status, it still thinks it's saying anything still good
.
Trust is local clock, but it's clock is a little faster than the other.
So in our next step, what we can do is we can go ahead and make, for example,
let's go look at our topology for a moment.
Let's make our three a client of our one and we'll make our four a client of
our two and then we can verify that they can synchronize their time and we
should also notice that the time on our three.
Should be bumped up about 20 minutes once that synchronization is completely
done.
So let's go to our three and let's make our three an NTB client to our one. WEBVTT X-TIMESTAMP-MAP=LOCAL:00:00:00.000,MPEGTS:900000
So let's go to our three and let's make our three an NTB client to our one.
So that will do a first access to this.
Let's do a show NTP status.
Make sure we don't have a configured yet, right?
We want a configuration mode and to set up our one as our NTP server, we type
an NTP server and then the IP address.
Now, because our one has multiple interfaces and has a loop back, it'd be wise
to point to the loop back interface instead of a physical interface address
because if we lose a file,
the physical interface, then we're pointing to that physical interface, we're
no longer going to get our NTP request answered.
So let's go ahead and point to our one's loop back address at one dot one dot WEBVTT X-TIMESTAMP-MAP=LOCAL:00:00:00.000,MPEGTS:900000
So let's go ahead and point to our one's loop back address at one dot one dot
one dot one.
And this also source it from our loop back in our three.
And that way, even if we lose an interface, we can still communicate out
existing remaining interfaces once the routing is converged and still reach our
NTP server.
So for the NTP server, we'll put in one dot one dot one dot one dot one and we
'll use a space question mark.
Then we're going to say source to specify our source interface and that's going
to be loop back zero, which is our three dot three three address.
And there's a few other options as well, including the minimum and maximum poll WEBVTT X-TIMESTAMP-MAP=LOCAL:00:00:00.000,MPEGTS:900000
And there's a few other options as well, including the minimum and maximum poll
intervals.
So I'm going to say the minimum poll interval is four.
So what that means is two to the power of four to four eight sixteen and I'm
also going to specify the max poll interval of four, which is also going to be
two to the power of four, which is sixteen space.
And then there's also an option for burst.
Now burst is on by default.
And what the intent there is that we're going to send multiple requests to our
NTP servers instead of just one periodically and that should help us to WEBVTT X-TIMESTAMP-MAP=LOCAL:00:00:00.000,MPEGTS:900000
NTP servers instead of just one periodically and that should help us to
synchronize more quickly.
So that's the syntax we're going to use.
If we're going to use a key for authentication, we can specify key.
If we wanted to specify prefer that keyword that would indicate which of our N
TP servers we prefer if we have multiple configured.
So now that we've done that, let's do a show NTP status press center and it
says synchronized.
Now, if I had done that a few moments earlier, it would very likely would have
shown that it was not synchronized until I had a few moments to go back and
forth and synchronized the time.
So it's considering itself stratum two.
That's because our reference time server, our one is a stratum one is showing WEBVTT X-TIMESTAMP-MAP=LOCAL:00:00:00.000,MPEGTS:900000
That's because our reference time server, our one is a stratum one is showing
here the reference servers address of one dot one dot one dot one with
additional details as well.
So if we did the upper key to show NTP status is still synchronized and
sometimes you may notice it may go into synchronization and it may go out
initially as it's starting to synchronize and get itself dialed in.
So once NTP is in place correctly and the master clock isn't, you know,
changing widely back and forth and as trusted, we should have synchronization.
We can also do a show NTP associations of breast center.
The till the shows us that we have reachability to our NTP server at one dot WEBVTT X-TIMESTAMP-MAP=LOCAL:00:00:00.000,MPEGTS:900000
The till the shows us that we have reachability to our NTP server at one dot
one dot one dot one.
That server is getting its time from local, meaning itself that server is a str
atum one.
And here's our value for reach.
And as we have more polls that go out, if we get the upper key and do that
again, that value should increase to the maximum of 377, which means fully
reachable.
Here is the round trip delay of 55 milliseconds.
And here is the current offset, which is the time difference in milliseconds
between the routers current time and the time provided by the NTP server. WEBVTT X-TIMESTAMP-MAP=LOCAL:00:00:00.000,MPEGTS:900000
between the routers current time and the time provided by the NTP server.
So a super small offset means that the router clock is closely synchronized
with servers clock and we're going to this little minus sign right there.
That means that this router is behind a little bit.
If it was a plus symbol, you mean our time on this local router is ahead.
So if we hit the upper key and did it again, you'll notice that offset is
changing and it's getting smaller.
So we were about 1.9 seconds off, meaning behind the NTP server and now we're
108 milliseconds off, which is close to a tenth of a second.
And if we hit the upper key again, and we give it more time, it's also likely WEBVTT X-TIMESTAMP-MAP=LOCAL:00:00:00.000,MPEGTS:900000
And if we hit the upper key again, and we give it more time, it's also likely
to go lower as it gets closer and closer to being synchronized.
And if we did a show NTP associations detail press center, again, that we get
as further details about our association with our NTP server.
So we have a server configured at 1.1.1.1.1. It's sane and valid, effectively
meaning that its time isn't drastically swinging back and forth.
There's our pull interval with our delay and offset and other information here
as well.
So if we were to take a look at the time on R1 and its client R3, in fact, let WEBVTT X-TIMESTAMP-MAP=LOCAL:00:00:00.000,MPEGTS:900000
So if we were to take a look at the time on R1 and its client R3, in fact, let
's do it right here.
We'll use this little icon and let's do a show that gives us some space here
and then we'll do a show clock and then we'll go ahead and run this on R1 and R
3 and we'll click on Send Script.
They should have a very close time.
So R3 is in the 14.08 range and R1 is also very close to that as well.
Where if we went to R2 and we did a show clock press center, it's showing 13.50
and that's because we changed the clock on R1 to be in the future about 20
minutes.
So let's take the next step and let's make R4 a client of R2. WEBVTT X-TIMESTAMP-MAP=LOCAL:00:00:00.000,MPEGTS:900000
So let's take the next step and let's make R4 a client of R2.
So we'll get R4 and on R4, let's go ahead and do a show NTP status, not set up
yet.
Great, we'll do a NTP server.
Let's use the loopback of 2222 up on R2.
We'll say source is our own loopback 0 which is our address of 4444.
Let's also set up the min pull time of 4 and next it means 2 to the power of 4
which is 16 and a max pull of also 4.
And let's go ahead and use the keyword of burst, although that's by default, it WEBVTT X-TIMESTAMP-MAP=LOCAL:00:00:00.000,MPEGTS:900000
And let's go ahead and use the keyword of burst, although that's by default, it
's going to be there.
And to confirm we can do a do, show, run, pipe, include and let's go ahead and
type in NTP.
So anything that's default, oops, it's not include.
So let's go ahead and say include.
So anything that's a default is not going to show up in the output.
So as far as the defaults, the burst is a default and the min pull of 4 is also
a default.
So the max pull of 4 wasn't a default and that's why it's showing up in the
output here.
So if we do a show NTP status press center, it shows that it's unsynchronized
and a stratum of 16. WEBVTT X-TIMESTAMP-MAP=LOCAL:00:00:00.000,MPEGTS:900000
and a stratum of 16.
So currently it's got a ways to go to synchronize.
So we do a show NTP associations.
It can confirm for us that we are configured.
So the tilde of the represents we have full connectivity to the server 2222 who
's getting its time from its local self.
It's a stratum 1 server.
And if we hit the upper okay a couple times this show NTP status is still unsyn
chronized, but I believe it's getting closer.
In fact, let's do this.
Let's do a debug NTP off and let's take a look.
In fact, let's also go ahead and remove the config and put it back so we can
see the play by play.
So let's do a do show run include NTP and I'll do a no in front of that. WEBVTT X-TIMESTAMP-MAP=LOCAL:00:00:00.000,MPEGTS:900000
So let's do a do show run include NTP and I'll do a no in front of that.
Oh, look at that.
So it just said clock synchronized with the NTP server.
So I am not going to remove that and have it come back back.
You know what?
Let's just watch it again with the debug.
So we'll do a no and I want NTP server 2222 and then we'll do a NTP server 2222
source loop back zero and we'll go ahead and use keyword burst and press center
.
All right.
So let me go ahead and turn off the debug here real quick. WEBVTT X-TIMESTAMP-MAP=LOCAL:00:00:00.000,MPEGTS:900000
So let me go ahead and turn off the debug here real quick.
We'll do a do an all and as I was going through these debug earlier, I saw this
really fun one right here popcorn popcorn.
So, but what that means is not quite synchronized yet.
So that's what that means like that.
Why did they put that there?
So someone had a sense of humor.
So popcorn popcorn means it's still synchronizing and right there that last
message right there indicates that it's now synchronized.
So if we do a show NTP status press center here, showing us status of
synchronized and we are stratum 2 and that's because we're synchronized to a WEBVTT X-TIMESTAMP-MAP=LOCAL:00:00:00.000,MPEGTS:900000
synchronized and we are stratum 2 and that's because we're synchronized to a
stratum 1 server.
We can verify that with a show NTP associations press center and that confirms
were synced up with a stratum 1 server and for more information that we can do
a show NTP association detail and press center.
So if we look at the clocks here on our two and our four, they should be very,
very close. So we'll go ahead and use the tool here to then that command our
two and our four at the same time.
Let's do a show clock and then we'll send that to our two and our four.
They're both selected will click on send script and there's our four 1357 and WEBVTT X-TIMESTAMP-MAP=LOCAL:00:00:00.000,MPEGTS:900000
They're both selected will click on send script and there's our four 1357 and
our two 1357 extremely close to each other because our two is the server and
our four is synchronized to our two.
Now another option we have with NTP is the option of today of NTP peers. Now
the benefit of that is that if we lose our more authoritative time servers like
for example stratum 2 or stratum 1 server, we can have our devices running NTP
peering with each other.
So at least they're not completely cut off from any option of learning and
hopefully correcting to the accurate time.
So I'll walk into configuring and verifying NTP peers in the very next video. WEBVTT X-TIMESTAMP-MAP=LOCAL:00:00:00.000,MPEGTS:900000
So I'll walk into configuring and verifying NTP peers in the very next video.
So see you there in just a moment.