NTP Explained | Network Time Protocol | Cisco CCNA 200-301

Video Statistics and Information

Video
Captions Word Cloud
Reddit Comments
Captions
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
Info
Channel: CertBros
Views: 21,336
Rating: 4.9079647 out of 5
Keywords:
Id: oCtkwEjhyD4
Channel Id: undefined
Length: 10min 13sec (613 seconds)
Published: Tue Dec 15 2020
Related Videos
Note
Please note that this website is currently a work in progress! Lots of interesting data and statistics to come.