NTP Explained | Network Time Protocol | Cisco CCNA 200-301
Summary
TLDRThis video from 'Cert Bros' delves into the Network Time Protocol (NTP), emphasizing its critical role in synchronizing network clocks for accurate timekeeping. Inconsistencies in time can lead to issues with log correlation, SSL certificates, and software. The video explains NTP's hierarchical structure, from reference clocks like atomic and GPS devices to primary time servers, and how devices sync to maintain accuracy. It also provides a step-by-step guide on configuring NTP on routers, illustrating the setup with an example using an internet NTP server and showcasing commands to verify synchronization and time accuracy.
Takeaways
- đ NTP, the Network Time Protocol, is essential for synchronizing clocks across a network to ensure accurate timekeeping.
- â° Inconsistent timekeeping can cause issues with log correlation, SSL certificates, and software, even if the discrepancy is just a few minutes.
- đą Every device on a network has an internal clock that tracks both time and date, and it's crucial to keep these clocks accurate.
- đ NTP uses a hierarchy system with stratum values ranging from 0 (most accurate) to 15 (least accurate) to identify the accuracy of a clock.
- đ Stratum zero devices, such as atomic clocks or GPS, are the most accurate time sources and do not connect over a network.
- đ Primary time servers, which are directly connected to stratum zero devices, have a stratum value of 1 and are the first layer in the NTP hierarchy.
- đ NTP operates by incrementing the stratum value by 1 at each layer, reflecting the distance from the reference clock and the decreasing accuracy.
- đ¶ NTP uses UDP port 123 for communication, making it easy to remember and configure.
- đ For smaller networks, an NTP Internet server can be used as a time source, while larger networks may opt for an internal GPS clock for security.
- đ ïž NTP configuration involves setting up the time zone, summer time adjustments, DNS server, and specifying the NTP server to sync with.
- đ Two useful NTP show commands are 'show ntp status' and 'show ntp associations', providing information about synchronization status and server details.
Q & A
What is the primary function of NTP?
-The primary function of NTP (Network Time Protocol) is to synchronize clocks over a network, ensuring that all devices have accurate and consistent time and date information.
Why is it important to have synchronized time across a network?
-Synchronized time is crucial for correlating logs, managing SSL certificates, and avoiding issues that can arise from inconsistencies, such as problems with software or network operations.
What issues can arise if network devices have inconsistent internal clock times?
-Inconsistent internal clock times can make it difficult to correlate logs, which can lead to confusion in troubleshooting and could result in looking in the wrong place for issues, especially when dealing with extensive log information.
What is a stratum in the context of NTP?
-In NTP, a stratum value identifies the accuracy of a clock, ranging from 0 (most accurate, such as reference clocks like atomic clocks or GPS) to 15 (least accurate), with anything above 15 considered untrustworthy.
How does the stratum hierarchy work in NTP?
-The stratum hierarchy in NTP adds a 1 to the stratum value at each layer, with stratum zero clocks being the most accurate and not connecting over a network. As you go down the hierarchy, the stratum values increase, indicating a decrease in time accuracy.
Which UDP port number does NTP use?
-NTP uses UDP port number 123 for its operations, making it easy to remember.
What is the role of a reference clock in NTP?
-A reference clock, such as an atomic clock, GPS, or radio clock, is a highly accurate timekeeping device that provides the time source for primary time servers in the NTP hierarchy.
How can a network administrator set up NTP on a router?
-A network administrator can set up NTP on a router by configuring the time zone, setting up daylight saving time if applicable, assigning a DNS server for domain name resolution, and specifying the NTP server address, which could be an internet NTP server or another internal device.
What are the two useful 'show' commands for checking NTP status and associations?
-The two useful 'show' commands are 'show ntp status', which shows if the device has synchronized and the stratum value, and 'show ntp associations', which provides details about the NTP server, including its IP address, reference clock, and stratum value.
How can a router become a stratum 3 device in an NTP setup?
-A router becomes a stratum 3 device when it synchronizes its time with an NTP server that is a stratum 2 device, such as an internet NTP server, thus becoming one hop further away from the time source.
What is the significance of stratum values increasing as you go down the NTP hierarchy?
-The increasing stratum values indicate that the devices are further away from the primary time source, resulting in less accurate timekeeping. This is important for understanding the reliability of the time information on each device in the network.
Outlines
đ Introduction to NTP and Its Importance
The video introduces the Network Time Protocol (NTP), emphasizing its critical role in synchronizing time across a network. It explains that time inconsistency can lead to issues with log correlation, SSL certificates, and software. The script uses an example of two routers with desynchronized logs to illustrate the potential confusion that can arise without NTP. It then explains the hierarchy of NTP, starting with stratum 0 reference clocks like atomic clocks and GPS, and how stratum values increase as accuracy decreases. The video outlines the setup of an NTP system, including the use of an NTP server and the significance of stratum values in maintaining time accuracy.
đ Configuring NTP on Network Devices
This paragraph delves into the practical setup of NTP on network devices, starting with the configuration of time zones and daylight saving settings to ensure accurate timekeeping. It demonstrates how to set up a router to synchronize with an NTP server, including the use of DNS for domain name resolution and the selection of an NTP server like pool.ntp.org. The script clarifies that NTP does not immediately adjust the clock but gradually aligns it with the server's time. It also introduces two useful commands, 'show ntp status' and 'show ntp associations', which provide information about the synchronization status and the details of the NTP server in use. The paragraph concludes with the configuration of a second router to synchronize with the first, illustrating the cascading effect of NTP synchronization across a network.
Mindmap
Keywords
đĄNetwork Time Protocol (NTP)
đĄStratum
đĄSynchronization
đĄInternal Clock
đĄLog Correlation
đĄSSL Certificates
đĄNTP Server
đĄUDP Port 123
đĄTime Zone
đĄSummer Time
đĄDNS Server
Highlights
Introduction to Network Time Protocol (NTP) and its role in synchronizing clocks over a network.
Importance of consistent time for correlating logs, SSL certificates, and software in a network.
Illustration of issues caused by inconsistent time on network devices using router logs as an example.
Explanation of the hierarchy system used by NTP, starting with highly accurate timekeeping devices.
Definition of 'stratum' in NTP and its role in identifying the accuracy of a clock.
Description of stratum values ranging from 0 to 15, with stratum zero being the most accurate.
Clarification that stratum zero clocks do not connect over a network and are directly connected to time servers.
How NTP uses UDP port number 123 for communication.
Real-life setup example using an internet NTP server for smaller networks.
Recommendation to sync an internal device like a router, firewall, or server to an NTP server.
Demonstration of configuring NTP on a router, including setting the time zone and summer time.
Importance of setting a DNS server for translating the NTP server's domain name.
Process of configuring an NTP server on a router and the significance of the stratum value.
Explanation of how NTP gently nudges the time until it's fully synced and tips to speed up the process.
Useful NTP show commands: 'show ntp status' and 'show ntp associations' for checking synchronization and server details.
Configuration of a second router to sync its time with the first router, illustrating the stratum hierarchy.
Final notes on synchronizing the rest of the network devices with the primary NTP server for accurate timekeeping.
Promotion of a full CCNA course related to the video content.
Call to action for viewers to like, comment, and subscribe for channel growth support.
Transcripts
hey what's up guys welcome to cert bros
in this video we're going to be looking
at
[Music]
ntp
ntp stands for network time protocol
it has the very important job of
synchronizing clocks
over a network time is one of those
things that can be
easily overlooked in a network though
having inconsistent time
even just by a few minutes can cause
problems
every device on a network will have an
internal clock
these internal clocks will track both
the time and the date
it's important to keep accurate clocks
otherwise
you may run into issues with correlating
logs
ssl certificates software and the list
goes on
let's take these two routers for example
if something happens to the link
connecting them we may want to look
at the logs our two logs show the line
went down
on the 13th of september at 804
if we then look at our ones logs it
shows the link went down
on the 1st of march at 12 25.
the link went down at the same time but
because the internal clocks are not
synced
it would be very difficult to correlate
these logs
now this is an extreme example but when
dealing with a lot of log information
even a few seconds can mean you're
looking in completely the wrong place
the problem is when our networks grow
keeping on top of the time and date for
every device
becomes nearly impossible this is where
ntp comes in
all of the devices will sync their
clocks to an ntp server which will have
an accurate time
so now we know the importance of ntp and
what it does
let's look at how it works ntp uses a
hierarchy system
at the very top we have the big boys the
mack daddies
these are highly accurate timekeeping
devices such as
atomic clocks gps or radio clocks
they are known as reference clocks they
have a stratum
of zero meaning they are the most
accurate
what does strata mean ntp uses stratum
values to identify the accuracy of a
clock
stratum values range between 0 to 15
with 0 being the most accurate and 15
being the least
anything above 15 means the accuracy of
the clock is not
trustworthy stratum zero clocks do not
connect over a network
they are directly connected to time
servers
they then sync their time and date to
the reference clock
these are known as primary time servers
the way the ntp strata model works is by
adding a 1
to the stratum value at each layer so
these primary time servers have a
stratum value of 1.
as we go further down the stratum
hierarchy the stratum values increase
this is because the reference clock is
further and further
away meaning the time is less accurate
ntp uses udp port number one
two three so that's nice and easy to
remember
let's look at how a real-life setup
could look using ntp
first we need a time source for smaller
networks
that source is likely going to be an ntp
internet server
for larger more security conscious
environments you may have your own
internal gps clock
i'll use an internet ntp server for this
example
there are several ntp servers available
you just need to do
a quick google search pool.ntp.org
is a popular one when connecting to an
internet ntp server
most of the time it will be a stratum 1
2 or 3 server
you should then sync an internal device
to that ntp server
this could be a router firewall or
server the choice is up to you
i'll be using this router once our
router is synced
we can then use it to provide the time
for the rest of the network
this makes our router a stratum 3 device
this is because
our internet ntp server in this example
is a stratum 2.
if you have a more complex network with
multiple routers
firewalls and vlans you may set up more
internal ntp
servers let's try this for real
i'm going to show you a basic ntp
configuration
here is router 1. it's already got an ip
address and it's connected to the
internet
the first thing we need to do is set up
the time zone and summer time
not doing this can make our clock
incorrect even with an ntp server
so first let's set the time zone
in config mode type clock
time zone and because i'm in the uk
we'll use gmt which is simply a word
and 0 0 because it syncs up with the utc
time
your time zone might be different
next let's change the summer time over
here we have something called
british summer time this is where our
clocks go forward and back
during the summer to set this up we need
to type
clock summer time
bst which again is just a word
and to make sure this reoccurs we're
going to type recurring
last sunday of march
at 1am so that's when our clocks go
forwards
and last sunday of october
at 2 a.m which is when our clocks go
back
okay now that's set we need to give our
router a dns server
that's because we need to translate our
ntp server's domain name
to set this up we need to type ip
name server and i'm going to use
google's dns server which is 8.8.8.8
next we need to tell our router where to
sync the time from
so i'll type ntp server
and now the name of the ntp server which
is pool.ntp.org
now this is a domain name that's going
to translate to my nearest ntp server
so that's why we needed to set the dns
an important note here
is that ntp doesn't sync the clock
straight away
the way the algorithm works is by gently
nudging the time
until it's fully synced so this can take
a few minutes
you can speed this up by manually
setting the clock as close to the
accurate time as possible
then ntp doesn't have as much work to
sync up
there are two useful show commands for
ntp
let's exit out of here to privilege exec
mode
the first command is show ntp status
this will show you if the device has
synchronized
the stratum value of the device and the
ip address of the ntp
server used for reference
if we type show ntp associations
this will show us the details of the ntp
server we're using
it shows us the ip address of the ntp
server
and the ip address of its reference
clock
it also shows us the stratum value of
the ntp server
and of course we can always check the
time is correct by running the
show clock command
so now this router is synced with our
ntp server
let's open router
we need to configure this router to sync
its time with router 1.
again all of the interfaces are already
configured
so i'll open global config by typing
configure terminal
and quickly set the time zone clock time
zone
the word gmt 0 0
and then the summer time by typing clock
summer time
the word bst recurring last sunday of
march at 1am
last sunday of october at 2 am
now let's set the ntp server ntp server
and i'll type the ip address of router 1
which is 192.168.0.254
just as before we can exit out of here
and use the show command
show ntp status
and as we can see it has now
synchronized with router 1.
we can also see that this router has a
stratum value of
4 which is 1 higher than router 1.
this is because we are now one hop
further away from the source
if we type show ntp associations
we can see router's one ip address its
reference clock
and its stratum value so there we have
it a nice and
simple ntp configuration you could then
configure the rest of your devices to
synchronize their time with router 1
and they will all be synchronized and
accurate this video is part of our full
ccna course which can be found
in the description so please feel free
to go and check that out
if you like this video don't forget to
give it a thumbs up comment
and subscribe the support from you guys
really does help this channel grow
other than that thank you for watching
Voir Plus de Vidéos Connexes
5.0 / 5 (0 votes)