CS3331/9331 Computer Networks and Applications
Application Layer – Answers
Q1) Why is SMTP not used for transferring e-mail messages from the recipient’s mail
server to the recipient’s personal computer?
Copyright By https://powcoder.com 加微信 powcoder
Answer: SMTP is a push protocol; the task of transferring e-mail messages from the recipient’s mail server to the recipient’s personal computer is a pull operation.
Q2) Why do you think DNS uses UDP, instead of TCP, for its query and response messages?
Answer: TCP involves a connection establishment phase while UDP does not. Using TCP for DNS may end up involving several TCP connections to be established since several name servers may have to be contacted to translate a name into an IP address. This imposes a high overhead in delay that is acceptable for larger transfers but not acceptable for very short messages such as DNS queries and responses. In addition, UDP affords a smaller packet size and also imposes a smaller load on name servers due to its simplicity in comparison to TCP.
Q3) Suppose you are sending an email from your Hotmail account to your friend,
who reads his/her e-mail from his/her mail server using IMAP. Briefly describe how your email travels from your host to your friend’s host. Also, what are the application-layer protocols involved?
Answer: Message is sent from your host to your mail server over HTTP. Your mail server then sends the message to your friend’s mail server over SMTP. Your friend then transfers the message from his/her mail server to his/her host over IMAP.
Q4) How can iterated DNS queries improve the overall performance?
Answer: Iterated request can improve overall performance by offloading the processing of requests from root and TLD servers to local servers. In recursive queries, root servers can be tied up ensuring the completion of numerous requests, which can result in a substantial decrease in performance. Iterated requests move that burden to local servers, and distributed the load more evenly throughout the Internet. With less work at the root servers, they can perform much faster.
Q5) Suppose you needed to use HTTP to download a web page with three embedded images. Draw diagrams, similar to those from class, depicting the main interactions between the client and server when using non-persistent HTTP, persistent HTTP without pipelining, and persistent HTTP with pipelining.
CS3331/9331 Computer Networks and Applications
CS3331/9331 Computer Networks and Applications
Q6) Suppose within your Web browser you click on a link to obtain a web page. The
IP address for the associated URL is not cached in your local host, so a DNS look-up
is necessary to obtain the IP address. Suppose that n DNS servers are visited before
your host receives the IP address from DNS; the successive visits incur an RTT of RTT1, ….., RTTn. Further suppose that the web page associated with the link contains
exactly one object, consisting of a small amount of HTML text. Let RTT0 denote the
RTT between the local host and the server containing the object. Assuming zero transmission time of the object, how much time elapses from when the client clicks on the link until the client receives the object?
Answer: The total amount of time to get the IP address is RTT1 + RTT2 + …. + RTTn. Once the IP address is known, RTTO elapses to set up the TCP connection and another
RTTO elapses to request and receive the small object. The total response time is
2RTT0+ RTT1 + RTT2 + …. + RTTn.
Q7) Consider the circular DHT example that we discussed in the lecture. Explain how peer 6 would join the DHT assuming that peer 15 is the designated contact peer for the DHT.
Answer: The sequence of actions is:
1. Peer 6 will contact Peer 15 with a join request.
2. Peer 15, whose successor is peer 1, knows that Peer 6 should not be its successor. Peer 15 will forward the join request from Peer 6 to Peer 1.
CS3331/9331 Computer Networks and Applications
3. Peer 1, whose successor is peer 3, knows that Peer 6 should not be its successor. Peer 1 will forward the join request from Peer 6 to Peer 3. The actions of peers 3 and 4 are identical to those of peers 15 and 1.
4. The join request will finally arrive at peer 5. Peer 5 knows that its current successor is peer 8, therefore peer 6 should become its new successor. Peer 5 will let peer 6 knows that its successor is peer 8. At the same time, peer 5 updates its successor to be peer 6.
Q8) Consider a new peer Alice that joins BitTorrent without possessing any chunks. Without any chunks, she cannot become a top-four uploader for any of the peers, since she has nothing to upload. How then will Alice get her first chunk?
Answer: Alice will get her first chunk as a result of she being selected by one of her neighbors as a result of an “optimistic unchoke,” for sending out chunks to her. Recall that a peer periodically selects one of its neighbours at random as a peer for uploading irrespective of whether this neighbour is uploading data to it or not.
Q9) Consider distributing a file of F = 10 Gbits to N peers. The server has an upload rate of us = 20Mbps, and each peer has a download rate of di = 1 Mbps and an upload rate of u. For N=10, 100 and 1000 and u = 200Kbps, 600 Kbps and 1 Mbps, prepare a chart giving the minimum distribution time for each of the combinations of N and u for both client-server distribution and P2P distribution.
Answer: For calculating the minimum distribution time for client-server distribution, we use the following formula:
Dcs = max {NF/us, F/dmin}
Similarly, for calculating the minimum distribution time for P2P distribution, we use the following formula:
Dp2p= max{F/us , F/dmin , NF/(us+ )}
F = 10 Gbits = 10 * 1024 Mbits us = 20 Mbps
dmin =di =1Mbps
CS3331/9331 Computer Networks and Applications
Client Server:
Peer to Peer:
200Kbps 600 Kbps 1Mbps
200Kbps 600 Kbps 1Mbps
10 100
10240 51200
10240 51200
10240 51200
10 100
10240 25600
10240 12800
10240 10240
1000 46545.45 16516.13 10240
Q10) Multiple Choice Questions – Choose one from the possible choices: A) correct answer is iii: between 1.0 to 1.1 sec
B) correct answer is i: 304 Not modified
C) correct answer is ii. False
D) correct answer is ii. False