So, guys, welcome back.
In this slide, we will going to understand what is first hop DNS servers.
So we will discuss what are first hop DNS server machines, what is the purpose and role of this first
hop DNS server machines in the Internet technology?
And what problem do these first hop DNS server machines solve?
So you can see in this diagram, the first hop DNS server is just a server which is present elsewhere
in the network and of course it is you which is sitting behind your ISP and you are connected to the
Internet through your Internet service provider.
So this is the very basic topology that we will going to use in order to understand the functionality
of first hop DNS servers.
So going forward, guys, our computer is assigned the address of first hop DNS server, and this address
is assigned either statically or manually.
That is the administrator himself.
Configures your machine with the IP address of first hop DNS server.
Right.
So this is one way your machine could be configured with the IP address of first hop DNS server if not
manually, then there is a special protocol called Dhcp protocol.
Using this protocol, your machine can automatically obtain the IP address of first hop DNS server from
your internet service provider.
So in either ways, the end result is that your machine is aware of the IP address of first hop DNS
server.
So you can see if you go to the TCP IP properties on your Windows operating system, you can see that
your operating system gives you the facility to manually configure the IP address of first hop DNS server.
So you can see in this column that you can specify the IP address of first hop DNS server on your local
machine.
So if you don't want to use any dynamic protocols such as Dhcp, you can always hardcode the IP address
of first hop DNS server on your local machine.
Now let us discuss that.
What is the functionality of a DNS server?
Our computer always first asks the first hop DNS server to obtain the IP address of the domain name
of a website we are trying to access.
So when you try to access any website on the Internet, the first thing that your computer needs is
to obtain the IP address of the host server machine, which is hosting that particular website.
And to know the IP address of that particular host server, your computer first asks the first hop DNS
server that Hey, what is the IP address of a website which I am trying to access?
Now there are two possibilities.
The first hop DNS server will either have a website address or it will not have.
So if first hop DNS server has the IP address of the host server machine, which hosts the requested
website, it returns the IP address to our computer.
Right?
Else.
That is, if our first hop DNS server do not have the IP address of the host server which hosts the
requested website, then the first hop DNS server queries the root DNS server on our behalf to obtain
the IP address of the requested website.
So we will going to discuss this functionality of first of DNS server more elaborately in the next slide.
First hop DNS server are also called DNS resolver.
And what is the reason?
The reason is that the first hop DNS server takes the responsibility to query the entire DNS system.
To obtain the IP address of the website you are trying to access.
Right.
So first hop DNS server is an interface between you and the rest of the DNS system.
And it is the first DNS server that will bring an IP address for the website you are trying to access
from the DNS system.
So another property of first hop DNS server is that that first hop DNS server caches, the recently
accessed website's IP address in its local DNS cache.
So you can see that this represents a local DNS cache.
Right.
So first hop DNS server caches, the recently accessed website's IP address in their local DNS cache
so that in future our computer can obtain the IP address of recently accessed website quickly from the
first hop DNS server.
Right.
In that case, the first hop DNS server would not have to query the DNS system in order to obtain the
IP address of the requested website, because that particular website is recently accessed.
Website and the first hop DNS server would store the IP address of recently accessed website in its
local DNS cache.
And remember first of DNS server is shared by several users.
It's not like that that there is one dedicated first hop DNS server for you.
The first hop DNS server is shared among many users and like first hop DNS server has a local cache
or computer, also have its own local DNS cache.
So the purpose of this local DNS cache is same.
That is recently accessed.
Website's IP address will be going to store in your computer's local memory.
So that in future, if you try to access the same website again, your computer would know the IP address
of such website and it really do not depend on the external DNS system to obtain the IP address for
recently accessed websites.
So this is done to speed up the access to the recently accessed website.
Now, next, let us try to understand the functionality of first Hop DNS server in little more detail.
So let's say on your computer you are trying to access the website w-w-w-what.
Customer support dot Microsoft.com.
Right.
So, for example, you are trying to access this website.
So what your computer will do.
Your computer will look up in its local DNS cache.
So let us assume that you are accessing this website for the first time.
Therefore, your local DNS cache will not have the IP address for the host server which actually hosts
this website.
So in this case, your computer will send the DNS query to the first hop DNS server.
And what is the meaning of this query?
This query means that what is the IP address of W-w-w-what Customer support dot Microsoft.com.
Right.
So DNS query is a DNS message that your computer or local machine will send to the first hop DNS server
and how your machine is able to send this DNS query to the first hop DNS server.
Because we discussed in the beginning that your machine knows the IP address of first hop DNS servers.
Now, first Hop DNS server will receive this DNS query after receiving this first hop DNS query.
The first hop DNS server will check in its DNS cache whether it has an IP address for the requested
website.
Right.
So let us assume that this first DNS server knows the IP address of this website.
Then in that case, this first hop DNS server will going to reply back to our computer with a DNS reply.
And what is DNS reply?
So DNS reply is another DNS message, and DNS reply means that IP address of website w-w-w-what customer
support dot microsoft.com is 8888.
So simple.
So you can see that if first DNS server has an IP address of the requested website in its local cache,
then it reply back with the DNS reply conveying our machine with the IP address of the requested website.
But now what if First hope DNS server also do not have IP address of the requested website?
W-w-w-what Customer support dot Microsoft.com.
What will happen?
So let us try to understand this scenario next.
So, guys, let us try to understand the configuration that we need to do on a first hop DNS server.
So first off, DNS servers are configured.
Such that they know the IP address of root DNS servers.
So you can see that we have a first hop DNS server and the DNS database of this first hop DNS server
is populated with the IP address of root DNS servers.
So somewhere in the network we have root DNS server whose IP address is 1.1.1.1.
So in the DNS database we have an entry for this root DNS server.
Similarly, the IP address 1.1.1.2 will be the IP address of some other root DNS server.
So remember, root DNS servers are replicated all across the globe.
So this is the basic configuration that we need to do on first hop DNS server.
Now, if first hop DNS servers do not have the required information.
So remember you were trying to access the website w-w-w-what customer support dot Microsoft.com and
your computer had sent the DNS query to the first hop DNS server asking the IP address of this website.
So now let us suppose that first hop DNS server do not know the IP address of this requested website.
So in that case, the first DNS server simply propagate your DNS query to the root DNS server because
the first DNS server knows the IP address of root DNS servers, it can very well send any message to
the root DNS server.
So in this case, in the event when first DNS server do not know the IP address of the requested website,
the first hop DNS server delegate the responsibility to know the IP address of the requested website
to the root DNS server and it does this by propagating the DNS query to the root DNS server.
Right now, what happens thereafter?
So in that case, we will try to understand the complete DNS mechanism to resolve the website domain
name to IP address.
So by now, you know the functionality of first hop DNS servers.
That is why it is there.
And now from here, we can now dive into a complete discussion of DNS mechanism.
That is how DNS system is able to resolve the website domain name to an IP address.
So next we will going to discuss that how actually DNS system works.