CA 18 - Write a blog on how DNS resolver is happening.

 DNS RESOLVER:

            So with the problem are having right now is that we have the domain name, we don't have the IP address of the server to reach it. We too don't have it in or cache, thus we move to DNS RESOLVER

            Once the user finds out that it's cache does not have the IP of the server it will initialize a DNS query to get the IP address of the server with the DNS name.

Example: 
                        www.instagram.com.

        This can be parted into differnet categories.

                1. Root - the last "dot" is called the root. It is a name server, which we will see in time.
                
                2. TLD [Top level Domain] - Here the ".com" is the TLD

                3. SLD [Secondary level Doman] - Here the "instagram" is called as the SLD

                4. Sub Domain - Here "www" is called as the sub domain.

    In DNS resolver we have to types:
    
            1. Sub Resolver
    
            2. Resolver

    SUB RESOLVER:

            Sub resolver, it tries to resolve the DNS within the local network before going into the internet.
The machine which sends the request (client ), modem,gateway are the sub resolver. First when the client tries to send a request it requests for the IP address of the server with the DNS.

        1. First the client checks with itself (it's cache) if it has the address of the server, if it had already accessed it recently. if not it will initialze the DNS query and forward it to the parent

        2. Modem receives it and check's it's own cache if any other user has recently hit the server and it's if it's IP is stored in it cache.If not it will forward it to it's parent

        So once any of the parent do not have the Ip of the server it is sent to the internet(ISP) which turns out to be the resolver. How will the sub machines forward the rquest to it's parent. They will send the request to the IP address 0.0.0.0 /0 which is the parent of each machine.

    RESOLVER:

        After the request reaches the internet, it will be taken by ISP and then given to the root.
        
            1. Root is a name server which receives the request and checks if it knows the IP address of the server and then if it could not find it then it will find which TLD is it and send to the TLD.
        
            2. Here the .com TLD gets it and checks if it has the IP , if not it will send it over to the SLD

            3. Here SLD is the instagram, in instagram SLD name sever, it will have Zone files, which the instgram used the third aprty to host itself. In this zone files there will be records.

        Zone files consist of records. A 'A' record will have the corresponding IPv4 for it's DNS name. A 'AAAA' record will have the corresponding Ipv6 for it's DNS name.

    Likewise the IPv4 is found and then sent back to the client. After all the now the client have the address so now it can send the request to the server.

Comments

Popular posts from this blog

CA 04 - Two Sum & Sorted Two Sum

CA 05 - Reverse the array

CA 21 - Basic Select SQL Queries