In: Computer Science
DNS Query and Web Page Access Time:
Suppose you click on a hyperlink on a webpage you are currently viewing -- this causes a new web page to be loaded and displayed. Suppose the IP address for the host in the new URL is not cached in your local DNS server (AKA local name server), so your Client (browser) makes a DNS query to obtain the IP address before the page can be requested from the web server.
To resolve the DNS (obtain the IP Address for the web server), three separate DNS servers are queried (local DNS Name Server, TLD1 and Authoritative NS). Finally, the local name server returns the IP address of the web server to the Client and the DNS is resolved. The round trip times (RTT) to reach the DNS servers are: RTT0 = 3 msec, RTT1 =40 msec and RTT2 = 20 msec.
The requested Web page contains a base HTML page and no objects. RTTHTTP = 60msec is the time to send an HTTP request to the Web Server hosting the webpage and receive a response is. In other words, it takes 60msecs for the Client to fetch a web page/object from the web server. (Note: RTT = Round Trip Time = the time to send request and receive a response – inclusive, both directions).
Authoritative NS TLD1
With respect to the above information, answer the following questions:
A. DNS
a. Make a list describing in words (not numbers) each step in the DNS resolution:
What does the Client have at the end of this query?
Local Name Server
b. How much time in total is spent on the DNS query (show your numbers)?
B. Accessing the Web Page
c. Now that the client has the IP address of the web server, what
step must the Client do before
sending the HTTP request? How long does this step take?
How long does it take to retrieve the base web page from the web server? (include step c)
How much total time IN TOTAL elapses from the instant the client first clicks on the hyperlink until the web page is displayed? This time includes (b),(c) and (d). (Assume 0 seconds transmission time for the web page – makes the problem easier, but not really true for large files!)
C. New Page / New Objects
Now suppose you request another page on the same web server: a base HTML page and 4 small objects. Neglecting transmission time, how much time elapses from the instant the new link is clicked until the entire page can be displayed? Assume the local DNS server has cached the IP address of the web server. Show your work. Assume persistent connection and pipelining.
The answer the given question is answered below. Please find answer and give like for my efforts.
A) DNS :-The Domain Name System is a hierarchical and decentralized naming system for computers, services, or other resources connected to the Internet or a private network. It associates various information with domain names assigned to each of the participating entities.
: a)
(i)
Steps in DNS Resolution are as follows:
i) User types in the web address in the address bar of the
browser window.
ii) Browser checks for the corresponding ip address of the web
address in the local cache
iii) If it doesnot find the IP address then it requests for the ip
address of the web page from the resolver server (provided by the
Internet Service Provider, i.e., the ISP )
iv) If the resolver server also doesnot know the IP address, then
it root server to tell the address of the TLD (top level domaion
server) from which request can be made to find the ip address of
the web site.
v) On receiving the address of the TLD, it requests the TLD to
return the IP address of the web page requested by the
browser.
vi) If TLD also doesnot know the corresponding IP adress then it
redirects the request to the Athoritative name server based on the
domain name specified in the web address.The Athoritative name
servers set at the top level of hierarchy, they have information
about each ip address of the domain.
vii) The Athoritative name server then returns the IP address of
the web site to the resolver server.
viii) The resolver server then caches the result (for future
reference) and returns the same to the client.
ix) Client caches the DNS record and extracts the IP address from
the record to forward it to the web browser.
X) Web browser then uses the IP address to access the web
site.
(ii)
After receiving the IP addess of the corresponding web page, the browser makes an HTTP request to the IP address and the server hosted at the IP address returns the contents of the web page which gets displayed in the browser window.
b)
Total time spent in the DNS query
= RTT to Local Name Server + RTT to TLD Server + RTT to Authoritative Server
= RTT0 + RTT1 + RTT2
= 3 msec + 40 msec + 20 msec
= 63 msec
Ans:
C)
After receiving the IP address ,
The client stores the DNS record in local DNS cache.
Retrieves the IP address from the DNS record
Passes the info to the web browser
Web browser makes a HTTP request to the server at the IP
address
Server returns the contents of the web page
Web page gets displayed in the browser window.
Immediately after the DNS, the time taken to fetch the web page is 60ms given by RTTHTTP .It is the time taken to send the HTTP request and serve the reuest by the server.
Total time taken(for size 0 files) is
= RTT to Local Name Server + RTT to TLD Server + RTT to Authoritative Server + RTT to HTTP request and response
= RTT0 + RTT1 + RTT2 + RTTHTTP
= 3 msec + 40 msec + 20 msec + 60 msec
=123 msec.