Talk:Web Science/Part1: Foundations of the web/Domain Name System/DNS address resolution

Information from the video
DNS address resolution

When you type a web address into a web browser like www.yahoo.com your computer needs to turn it into the IP Address so they can contact the web server to deliver web page to you. This is called the forward lookup because we are turning the host name into IP address. There is also reverse lookup that does the opposite: takes an IP address and turns it back into the host name.

It all starts with your computer. Your computer is a DNS client. A DNS client is one that issues the request to do a forward lookup. DNS server is one that answers that request in formal response. In order to do any kind of DNS lookup your client computer needs to contact a DNS server. Usually it is the one that is supplied by your internet service provider or maybe it’s on your LAN or etc. A DNS client that issues the request needs to know what DNS server to contact act on its behalf in order to fullfil that request. Some there is a configuration on the computer that just consists of an IP Address that tells what DNS server to contact. It might obtain this IP address from the router where it is put up or someone wrote it manually. Let’s say that the IP address in this configuration is 10.5.1.8 which is the IP address for a DNS server for internet service provider.

So your ISP ahs a DNS server which is going to act on your behalf to do DNS lookups for you. This is called a recursive query. You are going to issue a request to the ISP. The ISP is going to reissue that request to other DNS servers in order to get the answer for you. So your client computer starts issuing the request to the ISP and it asks a simple question: what is the address of  www.yahoo.com? If this is the first time DNS server has seen this request it doesn’t know the answer and needs to ask someone else. And this someone else is going to be a DNS server for the top level root-zone. Let’s say it has IP address 198.41.0.4 which is one of the root DNS servers. Your ISP now is going to forward your request to this DNS server asking the same question: what is the address of  www.yahoo.com? Most likely this name server is not responsible for knowing the answer for any question that is outside its zone. It’s going to come back with response: I don’t know the answer why don’t you go and ask name server for com-domain with c.gtld-servers.net with IP 192.26.92.30. This name server is going to take a request and reissue it to the com-DNS server (192.26.92.30). So it asks the same question again. But the ansew will be: I don’t know either. Why don’t you go to the yahoo.com name server (ns1.yahoo.com) with IP address 68.180.131.16? Your ISP reissues request again to the yahoo.com name server with the same question. And this time DNS server has the answer. It says that it is 72.30.2.43. Now your ISP has the answer and it can return the response back to you. And your computer is now able to contact with www.yahoo.com web server in order to deliver web page.

Now your ISP server having seen the answer will do one more thing for you. It is going to keep track of that answer. So it’s going to put down in cache the answer to the question: what is the address of  www.yahoo.com? Now the next time the client computer asks that same question your ISP DNS server is going to look in its cache, find the answer and return it straight back to you. This will save some steps in a future because it doesn’t have to go back and ask over and over again all these DNS servers. So the caching is really important part of DNS because it both solves the traffic problem but also it can cause some problems. If the address in the response ever changes your ISP server need to flash that answer out.

--Jane Kruch (discuss • contribs) 08:59, 7 November 2013 (UTC)