Transcript for:
Understanding Domain Name System (DNS)

Hello friends welcome back to my channel myself Chirag. In this video I am going to discuss about DNS domain name system topic of computer network. Let's see outline of this video. The first topic is introduction of DNS. The next is components of DNS in which I have covered domain name, namespace, name server and name resolver. And the last topic is working of DNS. So before start this video, let's subscribe me on YouTube Chirag Balodia. Follow my blog eduresources. Follow me on Instagram and on FB. All the video materials are available on my blog eduresources. All the links are given in description. Let's start with introduction of DNS. DNS stands for Domain Name System. Next, what is domain name? Domain or domain name is the location of website. We all know that the web pages of particular website is stored into the web server. And web server is located into the particular domain. So domain or domain name is the location of website. Next, what is DNS? So before discuss about the DNS, I will give you one non-technical example to understand the DNS. We all know about telephone directory. Using the telephone directory, We can find the number from the name and name from the number. So now we can say the DNS is the directory of internet. Using the DNS connecting the web browsers with web servers. It means user can access the website from the web servers through the DNS. So how can user access the website from the web server using the DNS? So I will discuss this topic in the working of DNS. Next purpose of DNS. So before discuss about the purpose of DNS, let's take one non-technical example to understand the purpose of DNS. If someone asking to you to remember the 50 person mobile number instead of their name. But we all know that human brain can store the limited numbers. But instead of numbers, we can remember the as many as person name. So as we know that we are stored the number with particular person name. So on the same way. Someone asked you to open the Google and Facebook using the IP address So our brain can remember the limited number of IP address So we are accessing all the website using the website name instead of IP address Because human brain can remember the maximum website names instead of IP address So the purpose of DNS is mapping IP address to the naming and naming to the IP address So it is the same as telephone directory. Next DNS uses port number 53. So the process of DNS using the port number 53 with UDP protocol and with TCP protocol. But in the working of DNS UDP protocol is the default protocol because in DNS immediate response is required to the user. So UDP is faster in compared to TCP. So UDP is the default protocol of DNS. So here there are two questions in my mind. The first question is, Why does DNS use UDP instead of TCP? The another question is, in which case DNS uses the TCP instead of UDP? So write your answers in the comment section. Next, components of DNS. DNS includes the following components. The first component is domain name. The second one is namespace. The third one is nameserver. And the fourth one is name resolver. Now discuss all the components in detail. one by one. First component of DNS is domain name. Domain or domain name means location of website. We all know that web pages of our website is stored on particular server and server is connected with particular domain. So domain or domain name means location of website. Next, domain name is divided into main three different categories in the internet. Now see in this diagram, the first domain name is generic domain, the second one is country domain, and the third one is country domain. and the third one is inverse domain so these three are the main domain of the dns in the internet all the domain and sub domain in the internet is connected with any one of this domain next each node in the tree defines a domain now see in this diagram this is the tree structure root is the parent node generic domain country domain and inverse domain is the child node of the tree so these three are the first child node so it is called the top level domain in the dns Each domain is an index to the domain namespace database. As we have already discussed, all the domain and subdomain in the internet is connected with any one of these three domains. Let's discuss these three domains one by one in detail with example. The first domain is generic domain. The three character domains are called the generic domains. But nowadays two character and four character domains are also available in the generic domain. Next, generic domain labels are as follow. Now see this table to understand the generic domain levels. First one is.com for the commercial organization. The second one is.edu for the educational organization. The third one is.gov for the government organization. The fourth one is.int it means the international organization. The fifth one is.mil, it's used for the military group. The next one is.net, it is used for the network support centers. And the next one is.org, it is used for the non-profit organizations. So here there are the some of example of the generic domains. Also many more generic domains are available in the DNS. And we all know that our website is ended with this particular labels. If this kind of label is present in our website, it means. Our website belongs to the generic domain. Let's take one example to understand the generic domain in detail. For example, I am accessing one website eduresources1.com. So how can I access this website now understand with tree structure of the DNS? In the DNS tree structure, we all know that the first node is root node. Root node is connected with three different domains, generic domain, country domain and inverse domain. So here we discuss about the generic domain only. So here we discuss about the generic domain only. So root node is connected with the different generic domains like edu.com.gov.mil.net. So this all the domain are connected with the root node is called as the top level domain. So here in our example our website is connected with.com domain. It means our website is belongs to the generic domain. So our website top level domain is.com. All the top level domains are connected with respected subdomains. That is called second level domain. So in this example our URL is eduresources1.com. Here.com is the top level domain and eduresources1 is the second level domain. So it means our URL is written in the inverse DNS tree structure. Now see in this diagram eduresources1.com. So this is the example of generic domain. Next domain is country domain. The two character domains are called the country domains. Here I have showed the some of the example of the country domains. Now in this third column this is the country name and this is the label of the country domains like Austria it means dot 80 Australia it means dot au like India is dot in Israel dot IL so here these are the some example of the country domains in country domain all the country names label are two characters let's take one example to understand the country domain in the detail for example there is one web URL BCC I dot in so let's understand how it belongs to the country domain so first of all there is a root node in the dns tree root node is connected with the main three domains generic domain country domain and inverse domain here we are discussing about the country domain so here root node is connected with some of the country domains so this all our country domain is the top level domain in the dns this all top level domains are connected with the respected sub domain it is called the second level domain so here in our example Top level domain is.in. So now see in this diagram.in is the connected with the root node because.in is the top level domain. Now second level domain is bcci. So it means our website is bcci.in. So now see in this diagram bcci.in is the connected with the root node. So now you can see over here in this diagram web url is written in the inverse tree domain structure. Next domain name is inverse domain. The purpose of inverse domain is mapping an IP address to a website name. So let us take one example to understand the inverse domain. There is one user. User want to access a website through the IP address. So first of all user will send this IP address to the root server. So root server check the IP address in the list of IP addresses. But root server cannot map this IP address to the website name. So root server send this query to the inverse domain. So this query is called. a pointer query or an inverse query. So how inverse domain evaluate this query? So we all know that in DNS root node is connected with three main domain. The first one is generic domain, the second one is country domain and the third one is inverse domain. So here we are discussing the inverse domain. In inverse domain the top level domain is ARPA. So root node is directly connected with the ARPA domain. The ARPA is connected with the second level domain in the inverse domain is in address. meaning the in address is inverse the address. So rest of the node define the IP address 132.35.50.120. So IP address is written in the inverse DNS tree structure 120.50.35.132-inaddress-ARPA. So inverse domain evaluate that IP address and map with the website name. For example this IP address is mapped with the web URL eduresources1.com So now inverse domain pass that URL to the root server. Because in this web URL the top level domain is.com. It means the website is belongs to the generic domain. So now see this diagram. Here generic domain and inverse domain both are connected through the root node. So inverse domain cannot send URL directly to the generic domain. Now root server pass this url to the dot com top level domain. Top level domain check the second level domain edu resources 1 it means the web server of that website. So after that web server send requested page to the user and the website will display on the user's web browser. So this is the actually working of inverse domain. What I have explained here in inverse domain is written over here you can read from this slide also. Next component is namespace. There are two types of namespace. The first one is flat namespace and the second one is hierarchical namespace. In flat namespace, all the nodes are directly connected to the root node. So there is no structure in the flat namespace. In hierarchical namespaces, all the nodes are connected with different partitions. Like top level domain, second level domain, third level domain. So now discuss both the namespaces one by one. The first one is flat namespaces. In flat namespaces, all the domain names are directly connected to the root node. connected with only root server it creates a flat namespaces and all the remaining nodes are directly connected to the root node. So that is called the flat namespace. Next there is no structure in the flat namespaces because all the nodes are connected to the root node. For example new node is added in the internet it is directly connected to the root node. Next flat namespaces is not supported in a large number of pieces in the internet. Nowadays in internet There are millions of PCs are connected with each other through the DNS. So whenever large number of PCs in the internet at that time flat namespaces are not working. Next, in flat namespace central authority is overloaded. So we have already discussed about that all the nodes in the internet is connected with the root node. So whenever new node is added into the internet it is directly connected with the root node. So central authority is overloaded. In Flat namespace there is no further division of the different domains like Generic domain, Country domain and Inverse domain. Because all the nodes are present in the top level domain. To overcome the limitation of the Flat namespace, Hierarchical namespaces is used. So in Hierarchical namespace provide a flexible naming structure. Now see in this diagram, root node is connected with the different nodes in the internet. The nodes that are directly connected to the root node in the Hierarchical namespaces It is called the top level domain. Next, the namespace is partitioned at the top level domain. Next, the top level domains are divided into the three areas. The first one is generic domain, the second one is country domain and the third one is inverse domain. Now, top level domain is further divided into the second level domain. So, this diagram shows the hierarchical namespace in the DNS. For example, our website is eduresources1.com. In hierarchical namespace, root node can easily find the website. because root node check the top level domain in the website URL so in our example the website URL top level domain is dot com it means our website is belongs to the generic domain and the second level domain is edu resources one so web URL is written in the inverse DNS tree structure edu resources one dot com the same as another example is the country domain XYZ dot au so in this URL root node check the top level domain So here top level domain is.au. So it means.au belongs to the country domain. And the second level domain is xyz. So our web URL is xyz.au. So using the hierarchical namespaces in the internet, DNS can easily map the web URL with the IP address with the immediate response to the user. Next component of DNS is DNS name server. So first of all what is name server? A DNS name server is a server. that store the DNS records. So name server is also known as the phone book of internet. Next, which kind of records has been stored in name server? Name server store address record, name server record and the mail exchanger record and also store the many more records. Next, what is the purpose of name server? So name server help to connect URLs with the IP address of the web servers. Next, server has some authority and also responsible for the operation which is performed in the DNS. Next, figure shows the hierarchy of the name server. So in this figure root server is connected with the top level domain, arpa server,.in server and.com server. So here,.in and.com top level domain is connected with some secondary level domain. For example, I want to access a one website, edresources1.com. So in this website URL, eduresources1 is the second level domain, which is connected with the top level domain.com. So our web URL is connected in an inverse DNS tree structure. Now see in this diagram, eduresources1 and which is connected with the.com server. Next, what is zone? Whenever server creates a database, it is known as zone. Sometimes root server gives the authority to the zone. Let's take one example to understand the zone. So we all know that root server is connected with the top level domain. So here root node is connected with the top level domain edu. So top level domain is connected with the some second level domain. And the second level domain is connected with the third level domain. So in this tree structure all the second and third level domain is connected with the top level domain edu. So that is called one domain. And we all know that edu is belongs to the generic domain. So this circle shows one of the generic domain. which is connected with the root node. So there is one question when the domain and zone are same and when the domain and zone are different. So let's understand this scenario the domain and zone are same and the domain and zone are different through this diagram. When domain does not divide into the sub domain at that time domain and zone are the same. Now see in this diagram for example state is one of the domain and all the nodes connected with the state domain which is not considered as the subdomain. So it means state is not divided into the subdomain. So it is called the zone and domain both are the same. When domain is divided into the subdomain and part of authority of other servers. So at that time domain and zone are the different. So now see in this diagram here edu is the zone because edu is divided into the subdomain. Like here state is the subdomain of edu. So as per our condition domain is divided into the subdomain. So it means the domain and zone are the different. And also root server give the authority to the zone edu. So this is the difference between domain and zone. For example I have one url state.edu. Here state is the zone and domain and edu is the zone or the top level domain. Next what is root server? If any node consists of the full tree it is called the root node. So the definition of root server is If zone consists of the full tree then zone server is called the root server. Now see in this diagram, here edu is the root server. Because any of the node which is entered into this particular domain, which is anyhow connected with that root server. It means connected with that edu. So for this domain edu is the root server. Next, how many types of server in DNS? So there are two types of server. The first one is primary server and the another one is secondary server. So let's discuss both the servers. Primary server means it keeps a file about the zone for which it is responsible and have the authority. So now see in this diagram. Here edu is the primary server because it keeps a file about the zone server. If any of the node which is connected in this domain is directly or indirectly connected with the edu. edu is update the database. So here edu is the primary server. Next, secondary server means it loads all the information from the primary server. So here state is the secondary server. So whenever state want to communicate with the connected node at that time all the information will be load from the edu server. So here state is the secondary server and edu is the primary server. Next, primary server performs operation on the zone file like create, update and maintain. So we have already discussed about that. If any of the node is entered into that domain, the primary server update the database. Next, secondary server cannot perform any operation on the zone file because secondary server has no authority and whenever secondary server wants the information at that time it loads all the information from the primary server. So this is the primary server and secondary server inside the DNS name server. Next component is name resolver. So before discuss about the name resolver there is one question. Which kind of architecture is used in DNS? There is client server architecture is used. in the DNS. Next, what is name resolver? Name resolver is one kind of client software when host needs to mapping domain name to IP address and IP address to the domain name. At that time, name resolver is used. Next, how many types of name resolver? There are two types of name resolver. The first one is mapping a domain name to an address and the second one is mapping an address to a domain name. So, there are two different methods are used for the name resolver. The first one is the recursive method and the second one is iterative method. So now first we discuss the types of name resolver and then discuss recursive and iterative method. So let us understand the types of name resolver. The first type is mapping a domain name to an IP address. So let us take one example to understand the first type mapping a domain name to an IP address. For example there is one user. User want to access one website. The website URL is www.eduresources1.com. So client browser pass this URL to the DNS resolver. DNS resolver pass this URL to the DNS server. DNS server map this URL. with the IP address of that web server and pass that IP address to the DNS resolver. Then DNS resolver pass this IP address to the user's browser. So now user's browser access that website through that IP address. We all know that there are three types of domain are connected to the DNS root node. The first one is generic domain, the second one is country domain and the third one is inverse domain. So in this mapping technique DNS server map domain name to an IP address either generic domain or a public domain. or country domain. Next type of the name resolver is mapping an IP address to a domain name. So let us take one example to understand this mapping technique. For example there is one user. User want to access a website through the IP address. So first of all user's browser send that IP address to the DNS resolver. DNS resolver send this IP address to the DNS server. So DNS map that IP address with particular web server and pass this web server name to the DNS resolver. And DNS resolver pass this web server name to the user's browser. So now user's browser is connect to that particular web server and the website is open at the user's browser. So in this mapping technique DNS server use inverse domain. So using the inverse domain IP address is mapped with the domain name. Now let's discuss recursive and iterative method one by one. So first of all I will discuss recursive method. Let's take one example to understand the recursive method. There is one user. User is accessing a website Amazon.in. So after some time user want to access another website eduresources1.com but user cannot directly access that website. So user send a request to the web server which is currently accessing by the user. So here user currently accessing the Amazon.in web server. So Amazon.in web server is trying to evaluate that query but this query is not resolved by the Amazon.in web server. So this web server passed this query to the upper level authority. Here upper level authority is the top level domain dot in. So top level domain try to evaluate that query but it cannot be evaluated by the top level domain. So top level domain dot in pass this query to the upper level authority root node. So first of all root node check the top level domain in the url. So here top level domain is dot com. So root node pass this query to the dot com top level domain. So top level domain check the second level domain in that web URL. The second level domain is eduresources1. So top level domain pass this query to the second level domain eduresources1. When the query is finally resolved, the response travel back until it finally reaches the requesting client and now client can access that website eduresources1.com. So this is called the recursive method. Now what I have discussed in the recursive method you can read from this slide. The next method is iterative method. Let us take one example to understand the iterative method. There is one user. User is currently accessing the website Amazon.in. It means user is connected with the web server Amazon.in. So after some time, user want to access another website eduresources1.com. But user cannot access that website directly. If the client does not ask for a recursive answer, the mapping can be done iteratively. So client send a request to the currently accessing web server. So here currently accessing web server is the Amazon.in. So here Amazon.in web server cannot evaluate the query. So Amazon.in web server provide the IP address of the upper level authority to the client or user. So user pass this query to the upper level authority. Here upper level authority is the top level domain.in. So again top level domain.in cannot evaluate that query and provide the upper level authority IP address to the client. So now client send a query to the root node. So root node check the URL and find the top level domain. Here top level domain is.com. So root server provide the IP address of the top level domain.com. So root server provide the IP address of the top level domain.com to the user. So now user has the IP address of the top level domain. So user pass this query to the top level domain.com. So here top level domain.com check the second level domain. So here second level domain is eduresources1. So top level domain provide the IP address of that web server or we can say second level domain to the user. So now user send a request to that IP address eduresources1.com. So now user send a request to that web server IP address. So that web server provide the requested file to the user and user can access the website eduresources1.com. So this is called the iterative method. So what I have discussed over here is written in this slide you can read from this slide. Next, Working of DNS. Let us take one example to understand the working of DNS. There is one user. User want to access a website www.eduresources1.com. So first of all, user enters the URL into the web browser. Web browser sends this URL to the DNS resolver. The purpose of DNS resolver is mapping website name to IP address and IP address to website name. Now DNS resolver send this URL to the root server. Root server is connected with three main domains. Generic domain. country domain and inverse domain. So here we all know that the purpose of inverse domain is mapping IP address to the domain name. But in this example DNS resolver sent the website name to the DNS root server. So here root server will not contact to the inverse domain. So root server has two options generic domain and country domain. So here in our example the top level domain is.com. So here.com is three character domain name. It means root server will contact to the generic domain. Because top-level domain dot com is belongs to the generic domain. So now DNS root server pass this URL to the top-level domain dot com. Now top-level domain check the second-level domain. Here our second-level domain is edu resources 1. For example our second-level domain is registered to the google dot com server. So top-level domain pass this URL to the second-level domain google-deme-server. So now Google name server check this URL and find the corresponding IP address of that registered website. And pass this IP address to the DNS resolver. And DNS resolver will pass this IP address to the user's web browser. So now user's browser search this IP address on the internet and connect to the web server eduresources1.com. And then web server eduresources1.com accept that request from the. Users browser now web server send users requested page to the users browser and that requested page is display in the users Browser, so this is the working of DNS So if you have any query you can ask me in comment section if you like this video Please hit the like button and share with others. Thank you for watching this video