Solution for Assignment 2 


1. Imagine that someone in the ICS department at KFUPM has just written a new program that he wants to distribute by FTP.  He puts the program in the FTP directory ftp/pub/freebies/newprog.c. What is the URL for this program likely to be?

ftp://www.ccse.kfupm.edu.sa/ftp/pub/freebies/newprog.c

2. Suppose that the Web contains 10 million pages, each with an average of 10 hyperlinks. Fetching a page averages 100 msec.  What is the minimum time to index the entire web?

At 100 msec per page, it will take 1 million seconds to get them all, or about 11.6 days.  The number of hyperlinks is irrelevant because of cahching, i.e., making sure the page is visited only once.

3. Does it make sense for two domain servers to contain exactly the same set of names? Why and why not?

Yes in case of redundancy and reliability.

4. Can a host be a domain name server?

Yes.

5. Experiment with a program called nslookup on your PC? What is the program used for?

Mapping IP to name and vice versa.

6.  From a PC lab on CCSE college, try these commands: 1) nslookup -type=A www.kfupm.edu.sa 2) nslookup -type=CNAME ftp.kfupm.edu.sa.  Show the output of these two commands and explain it.

C:\>nslookup -type=A www.kfupm.edu.sa
Server: ccse-apps3.pc.ccse.kfupm.edu.sa
Address: 172.16.0.1

Name: www.kfupm.edu.sa
Address: 10.140.1.32


C:\>nslookup -type=CNAME ftp.kfupm.edu.sa
Server: ccse-apps3.pc.ccse.kfupm.edu.sa
Address: 172.16.0.1

ftp.kfupm.edu.sa canonical name = www.kfupm.edu.sa

C:\>

7. Why is HTTP1.0 protocol is less efficient than HTTP1.1?

HTTP1.1 handles multiple client requests per connection, where as HTTP1.0 handles only request per connection.

8. What is the difference between persistent HTTP with pipelining and persistent HTTP without pipelining?  Which one is used by HTTP1.1?

In persistent HTTP without pipelining, the browser first waits to receive a HTTP response from the server before issuing a new HTTP request. In persistent HTTP with pipelining, the browser issues requests as soon as it has a need to do so, without waiting for response messages from the server.

9. Consider an e-commerce site that wants to keep a purchase record for each of its customers.  Describe how this can be done with HTTP authentication.  Describe how this can be down with cookies.

In both cases, the site must keep a database record for the user. With HTTP authentication, the user first registers with the site. During each subsequent visit, the user provides a username and password, which allows the site to identify the user and update the user’s record. With cookies, the user does not explicitly provide a username and password each time it visits the site. However, browser identifies the user by sending the user’s cookie number each time the user accesses the site.

10. Each Internet host has at least one local name server and one authoritative name server.  What role does each of these servers have in DNS?

A host’s authoritative name server provides the “official” translation of a hostname to an IP address (among other things). A host’s local name server is a proxy to the DNS system: the host first queries its local name server for a mapping; the local name server then obtains the mapping on the behalf of the querying host.

11. Is it possible that an organization's Web server and mail server have exactly the name for a hostname (e.g. foo.com)?  What would be the type for the RR that contains the hostname for the mail server?

Yes an organization’s mail server and Web server can have the same alias for a host name. The MX record is used to map the mail server’s host name to its IP address.

12. Describe the role of DNS in a content distribution network.

DNS is often used for redirection in a CDN. When a host receives an HTML page from a Web server, the page can contain references to objects in the CDN. The host will then do a DNS lookup to get the IP address of the CDN. DNS can then redirect the host to best CDN server for the host.