1 00:00:06,750 --> 00:00:07,583 - In this video, 2 00:00:07,583 --> 00:00:10,740 I want to talk about NTP. 3 00:00:10,740 --> 00:00:13,590 NTP is the network time protocol 4 00:00:13,590 --> 00:00:17,310 and NTP plays an important role in Linux. 5 00:00:17,310 --> 00:00:21,153 Because from NTP you will typically manage your system time. 6 00:00:22,530 --> 00:00:25,320 That's a time that is maintained by your operating system 7 00:00:25,320 --> 00:00:27,630 about which we have talked before. 8 00:00:27,630 --> 00:00:29,970 In order to synchronize your system time, 9 00:00:29,970 --> 00:00:32,733 Linux knows different NTP services. 10 00:00:33,600 --> 00:00:36,720 Chrony is one of the fundamental services. 11 00:00:36,720 --> 00:00:37,560 Apart from that, 12 00:00:37,560 --> 00:00:39,903 there is systemd-timesyncd. 13 00:00:41,400 --> 00:00:43,260 Both are fulfilling the same role, 14 00:00:43,260 --> 00:00:46,290 and they get their time from the internet. 15 00:00:46,290 --> 00:00:51,000 To determine the trustworthiness of a NTP time server 16 00:00:51,000 --> 00:00:53,010 that they are going to synchronize with, 17 00:00:53,010 --> 00:00:56,760 NTP uses the notion of stratum. 18 00:00:56,760 --> 00:01:01,760 The stratum explains the reliability of an NTP time server. 19 00:01:02,550 --> 00:01:07,260 And stratum goes from 1 all the way up to 16, 20 00:01:07,260 --> 00:01:09,360 where 16 means do not use 21 00:01:09,360 --> 00:01:13,080 and 1 means the most reliable time server. 22 00:01:13,080 --> 00:01:14,220 Now what is going to happen 23 00:01:14,220 --> 00:01:16,020 if your chrony is getting the time 24 00:01:16,020 --> 00:01:19,110 from a time server that has stratum 1? 25 00:01:19,110 --> 00:01:20,100 Well then chrony knows 26 00:01:20,100 --> 00:01:22,830 that it's the highest level of reliability 27 00:01:22,830 --> 00:01:24,840 and it will most likely choose 28 00:01:24,840 --> 00:01:27,930 to synchronize with that specific time server. 29 00:01:27,930 --> 00:01:29,970 In a time server's configuration 30 00:01:29,970 --> 00:01:33,120 you typically will work with different time sources. 31 00:01:33,120 --> 00:01:35,310 So you might find that chrony 32 00:01:35,310 --> 00:01:38,400 is getting the time from three different time servers, 33 00:01:38,400 --> 00:01:39,900 one of them having stratum 1, 34 00:01:39,900 --> 00:01:42,360 the other ones having stratum 3. 35 00:01:42,360 --> 00:01:43,620 So chrony definitely 36 00:01:43,620 --> 00:01:45,660 is going to synchronize with the stratum 1. 37 00:01:45,660 --> 00:01:47,310 And as a result, 38 00:01:47,310 --> 00:01:52,310 your NTP stack on your system will get stratum 2. 39 00:01:53,220 --> 00:01:54,820 And that allows you to determine 40 00:01:56,340 --> 00:02:00,090 the trustworthiness of time services and time sources 41 00:02:00,090 --> 00:02:02,460 in an internet environment. 42 00:02:02,460 --> 00:02:04,710 The chrony utilities even allows you 43 00:02:04,710 --> 00:02:07,410 to figure out which stratum currently is used, 44 00:02:07,410 --> 00:02:09,110 and you'll learn about these next.