1 00:00:00,230 --> 00:00:06,680 The often used analogy to explain the domain name system is that it serves as the phone book for the 2 00:00:06,680 --> 00:00:11,780 Internet by translating human friendly computer host names into IP addresses. 3 00:00:12,310 --> 00:00:18,790 Simply, DNS is a directory of names that match with IP addresses. 4 00:00:19,470 --> 00:00:25,470 As you may know, each device connected to the Internet as a unique IP address, which other machines 5 00:00:25,470 --> 00:00:27,090 use to find the device. 6 00:00:28,030 --> 00:00:33,550 DNS servers eliminate the need for humans to memorize IP addresses such as. 7 00:00:33,550 --> 00:00:37,540 212.80.75.134. 8 00:00:38,140 --> 00:00:42,730 Think about the websites you visit every day Google and YouTube, Facebook, Twitter, etcetera. 9 00:00:42,730 --> 00:00:48,740 Without DNS, we would have to reach these sites by using their IP addresses instead of their names. 10 00:00:49,450 --> 00:00:54,550 I think remembering the names is so much easier than remembering the strange numbers. 11 00:00:55,240 --> 00:01:01,540 But it's still possible to reach the computer with that strange number string as well. 12 00:01:02,850 --> 00:01:07,920 Now DNS deserves to have far more time spent on it. 13 00:01:08,010 --> 00:01:13,320 It could be a whole course in and of itself, but I just want to explain it simply without going too 14 00:01:13,320 --> 00:01:13,740 deep. 15 00:01:14,310 --> 00:01:21,480 So when you enter the URL such as dub, dub, dub, dot, Google.com into the web browser, the request 16 00:01:21,480 --> 00:01:24,120 is not directly sent to the Google servers. 17 00:01:24,670 --> 00:01:31,060 Instead, the request goes to the DNS server that uses a lookup table to determine the IP address of 18 00:01:31,060 --> 00:01:32,860 the website that is being requested. 19 00:01:33,320 --> 00:01:39,980 Then it forwards this information to the proper servers and returns the information requested to your 20 00:01:39,980 --> 00:01:41,240 specific browser. 21 00:01:42,270 --> 00:01:49,080 DNS server is a computer server which contains a database of public IP addresses and their associated 22 00:01:49,080 --> 00:01:50,070 host names. 23 00:01:50,250 --> 00:01:54,510 It translates those common names to IP addresses as requested. 24 00:01:55,190 --> 00:02:01,910 DNS servers, run special software and communicate with each other using special protocols. 25 00:02:02,860 --> 00:02:07,180 DNS is a client server network communication system. 26 00:02:08,160 --> 00:02:14,640 DNS clients send their requests to and receive the responses from DNS servers. 27 00:02:15,320 --> 00:02:21,500 The requests containing the name and resulting in an IP address being returned from the server are called 28 00:02:21,500 --> 00:02:23,990 forward DNS lookups. 29 00:02:25,010 --> 00:02:32,960 The request containing IP addresses and resulting in the names are called the reverse DNS lookups. 30 00:02:33,590 --> 00:02:40,220 The DNS directory that matches name to number isn't located all in one place. 31 00:02:41,730 --> 00:02:43,290 Pretty much like the Internet itself. 32 00:02:43,290 --> 00:02:49,560 The directory is distributed around the world, stored on domain name servers that all communicate with 33 00:02:49,560 --> 00:02:55,920 each other on a very regular basis to provide updates as well as redundancies. 34 00:02:56,590 --> 00:03:05,530 With more than 332 million domain names listed by the end of 2017, a single directory would be very 35 00:03:05,530 --> 00:03:06,490 large indeed. 36 00:03:08,060 --> 00:03:14,150 So when you type mail.google.com into your browser, your browser sends a query over the internet to 37 00:03:14,150 --> 00:03:15,320 find the website. 38 00:03:15,620 --> 00:03:20,510 It's a query seeking to match the domain name with its corresponding IP address. 39 00:03:21,390 --> 00:03:25,500 So let's follow the path of this question over the Internet infrastructure. 40 00:03:27,010 --> 00:03:34,180 The first server your query interacts with is the DNS resolver, which can be operated by your ISP, 41 00:03:34,900 --> 00:03:36,400 Internet service provider. 42 00:03:36,670 --> 00:03:44,290 A resolver is basically responsible for initiating and sequencing the queries that ultimately lead to 43 00:03:44,290 --> 00:03:45,550 a full resolution. 44 00:03:46,720 --> 00:03:52,810 Domain name resolvers determine the domain name servers responsible for the domain name in question 45 00:03:52,810 --> 00:03:56,170 by a sequence of queries, starting with the rightmost. 46 00:03:56,170 --> 00:03:58,540 In other words, a top level domain label. 47 00:03:59,940 --> 00:04:06,690 Assuming the resolver has no cached records to accelerate the process, which is the worst case scenario, 48 00:04:07,020 --> 00:04:11,850 the resolution process starts with a query to one of the root servers. 49 00:04:12,600 --> 00:04:20,010 The root servers are running all over the world and each one knows DNS information about top level domains 50 00:04:20,010 --> 00:04:22,860 or TLD, such as.com. 51 00:04:24,020 --> 00:04:30,770 So to begin answering your query, the resolver asks a root server for DNS information about.com. 52 00:04:31,930 --> 00:04:37,210 So there are 13 sets of root servers in more than 300 locations around the world. 53 00:04:38,500 --> 00:04:46,060 Each TLD DNS name server stores the address information for second level domains within the top level 54 00:04:46,060 --> 00:04:46,690 domain. 55 00:04:46,770 --> 00:04:48,280 Dot com in our example. 56 00:04:48,860 --> 00:04:52,670 The second level domain is google.com. 57 00:04:52,940 --> 00:05:00,110 When your query reaches the TLD server, the TLD server answers with the IP address of the domain's 58 00:05:00,110 --> 00:05:03,890 name server, which will provide the next piece of the puzzle. 59 00:05:04,640 --> 00:05:08,570 So this is the final step of address resolution. 60 00:05:09,250 --> 00:05:13,930 The recursive resolver sends the query to the domain's name server. 61 00:05:14,380 --> 00:05:22,870 This DNS server knows the IP address for the full domain mail.google.com and that answer is returned 62 00:05:22,870 --> 00:05:25,120 to the recursive resolver. 63 00:05:26,120 --> 00:05:31,970 Now that the recursive resolver knows the IP address for the domain name in your query, the recursive 64 00:05:31,970 --> 00:05:35,870 resolver tells the browser what the IP address is. 65 00:05:36,650 --> 00:05:44,450 So finally, your browser can send a request to the website to retrieve the website's content using 66 00:05:44,450 --> 00:05:46,330 the IP address it just learned. 67 00:05:46,780 --> 00:05:50,710 This whole process might seem, well, complicated. 68 00:05:50,710 --> 00:05:55,690 It certainly sounds it to talk it out, but really takes very little time at all.