Docsity

Computer Networks A top-down approch, Exams of Computer Networks

Toggle sidebar
bg1
CEN 4500C Computer Networks Fundamentals
Instructor: Prof. A. Helmy
Homework 2: Application Layer (the top layer)
Date Assigned: Sept 29, 2007. Due Date: Oct 11th, 2007 (beginning of lecture)
Total (max) points: 130 [+ 6 extra points possible]
R4. For a p2p file-sharing application, do you agree with the statement, "There is no
notion of client and server sides of a communication session"? <2 points> Why or why
not? <2 points>
4. No. All communication sessions have a client side and a server side.
In a P2P file-sharing application, the peer that is receiving a file is
typically the client and the peer that is sending the file is typically the
server.
R5. What information is used by a process running on one host to identify a process
running on another host? <4 points>
5. The IP address of the destination host and the port number of the
destination socket.
R6. Suppose you wanted to do a transaction from a remote client to a server as fast as
possible. Would you use UDP or TCP? <2 points> Why? <4 points>
6. You would use UDP. With UDP, the transaction can be completed in
one roundtrip time (RTT) - the client sends the transaction request into
a UDP socket, and the server sends the reply back to the client's UDP
socket. With TCP, a minimum of two RTTs are needed - one to set-up
the TCP connection, and another for the client to send the request, and
for the server to send back the reply.
R7. Referring to Figure 2.4, we see that none of the applications listed in Figure 2.4
requires both no data loss and timing. Can you conceive of an application that requires no
data loss and that is also highly time-sensitive? [Justify the need for the requirements] <3
points for each good application, up to 9 points>
7. There are no good existing examples of an application that requires
no data loss and timing. However, one can imagine that some future
applications may have such requirements:
Telemedicine (remote surgery): time sensitive and loss sensitive
Remote vehicle control (breaking a car remotely over the network)
Remote rescue (e.g., controlling a robot (or robotic arm) to disable a moving harmful
device).
Navigating a museum (or rare objects using a robot) over the Internet …. Or other
reasonable examples. [Every reasonable example with brief justification of why the
requirements of no-loss and delay-sensitivity is worth 3 points, up to max 9 points]
pf3
pf4
pf5

Partial preview of the text

Download Computer Networks A top-down approch and more Exams Computer Networks in PDF only on Docsity!

CEN 4500C Computer Networks Fundamentals

Instructor: Prof. A. Helmy

Homework 2: Application Layer (the top layer)

Date Assigned: Sept 29, 2007. Due Date: Oct 11 th, 2007 (beginning of lecture) Total (max) points: 130 [+ 6 extra points possible]

R4. For a p2p file-sharing application, do you agree with the statement, "There is no notion of client and server sides of a communication session"? <2 points> Why or why not? <2 points>

  1. No. All communication sessions have a client side and a server side.

In a P2P file-sharing application, the peer that is receiving a file is typically the client and the peer that is sending the file is typically the server.

R5. What information is used by a process running on one host to identify a process running on another host? <4 points>

  1. The IP address of the destination host and the port number of the destination socket.

R6. Suppose you wanted to do a transaction from a remote client to a server as fast as possible. Would you use UDP or TCP? <2 points> Why? <4 points>

  1. You would use UDP. With UDP, the transaction can be completed in one roundtrip time (RTT) - the client sends the transaction request into a UDP socket, and the server sends the reply back to the client's UDP socket. With TCP, a minimum of two RTTs are needed - one to set-up the TCP connection, and another for the client to send the request, and for the server to send back the reply.

R7. Referring to Figure 2.4, we see that none of the applications listed in Figure 2. requires both no data loss and timing. Can you conceive of an application that requires no data loss and that is also highly time-sensitive? [Justify the need for the requirements] < points for each good application, up to 9 points>

  1. There are no good existing examples of an application that requires no data loss and timing. However, one can imagine that some future applications may have such requirements: Telemedicine (remote surgery): time sensitive and loss sensitive Remote vehicle control (breaking a car remotely over the network) Remote rescue (e.g., controlling a robot (or robotic arm) to disable a moving harmful device). Navigating a museum (or rare objects using a robot) over the Internet …. Or other reasonable examples. [Every reasonable example with brief justification of why the requirements of no-loss and delay-sensitivity is worth 3 points, up to max 9 points]

R8. List the four broad classes of services that a transport protocol can provide. For each of the service classes, indicate if either UDP or TCP (or both) provides such a service. < points>

  1. <2 points for each item> a) Reliable data transfer TCP provides a reliable byte-stream between client and server but UDP does not.

b) A guarantee that a certain value for throughput will be maintained Neither c) A guarantee that data will be delivered within a specified amount of time Neither d) Security Neither

R11. Why do HTTP, FTP, SMTP, and POP3 run on top of TPC rather than on UDP? < 4 points>

  1. The applications associated with those protocols require that all

application data be received in the correct order and without gaps. TCP provides this service whereas UDP does not.

R12. Consider an e-commerce site that wants to keep a purchase record for each of its customers. Describe how this can be done with cookies. <4 points>

  1. When the user first visits the site, the site returns a cookie number. This cookie number is stored on the user’s host and is managed by the browser. During each subsequent visit (and purchase), the browser sends the cookie number back to the site. Thus the site knows when this user (more precisely, this browser) is visiting the site.

R13. Describe how Web caching can reduce the delay in receiving a requested object. Will Web caching reduce the delay for all objects requested by a user or for only some of the objects? Why? <6 points>

  1. Web caching can bring the desired content “closer” to the user, perhaps to the same LAN to which the user’s host is connected. Web caching can reduce the delay for all objects, even objects that are not cached, since caching reduces the traffic on links.

R16. Suppose Alice, with a web-based email account (such as hotmail or gmail), sends a message to Bob, who accesses his mail from his mail server using POP3. Discuss how the message gets from Alice's host to Bob's host. Be sure to list the series of application- layer protocols that are used to move the message between the two hosts. <6 points>

  1. Message is sent from Alice’s host to her mail server over HTTP. Alice’s mail server then sends the message to Bob’s mail server over SMTP. Bob then transfers the message

from his mail server to his host over POP3.

  1. Centralized directory of resources/files, as in Napster. Advantage is that search for resources is simple with min overhead (just ask the centralized server). The disadvantages are: single point of failure, performance bottleneck and target of lawsuit.
  2. Fully distributed, non-centralized architecture, as in Gnutella, where all peers and edges form a ‘flat’ overlay (without hierarchy). Advantages: robustness to failure, no performance bottleneck and no target for lawsuit. Disadvantages is that search is more involved and incurs high overhead with query flooding.
  3. Hierarchical overlay, with some nodes acting as super nodes (or cluster heads), or nodes forming loose neighborhoods (sometimes referred to as loose hierarchy, as in BitTorrent). Advantages, robust (no single point of failure), avoids flooding to search for resources during queries. Disadvantages, needs to keep track of at least some nodes using the ‘Tracker’ server. In general, this architecture attempts to combine the best of the 2 other architectures.

R20. In BitTorrent, suppose Alice provides chunks to Bob throughout a 30-second interval. Will Bob necessarily return the favor and provide chunks to Alice in this same interval? Why or why not? <6 points>

  1. It is not necessary that Bob will also provide chunks to Alice. Alice has to be in the top 4 neighbors of Bob for Bob to send out chunks to her (or through random selection); this might not occur even if Alice provides chunks to Bob throughout a 30-second interval.

P1. True or False? <2 points for each> a. A user requests a web page that consists of some text and two images. For this page, the client will send one request message and receive three response messages.

False.

b. Two distinct web pages (for example, www.mit.edu/research.html and www.mit.edu/ students.html) can be sent over the same persistent connection.

True.

c. With non-persistent connections between browser and origin server, it is possible for a single TCP segment to carry two distinct HTTP request messages.

False.

P7. 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 lookup 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, ... RTT (^) n. Further suppose that the web page associated with the link contains exactly one

object, consisting of a small amount of HTML text. Let RTT 0 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? <6 points>

The total amount of time to get the IP address is RTT 1 +^ RTT^2 + … +^ RTT^ n^. Once the IP address is known, RTT 0 elapses to set up the TCP

connection and another RTT 0 elapses to request and receive the small object. The total response time is D = 2 RTT 0 + RTT 1 + RTT 2 + … + RTTn

P8. Referring to problem P7, suppose the HTML file references three very small objects on the same server. Neglecting transmission times, how much time elapses with: a. Non-persistent HTTP with no parallel TCP connections? <3 points> b. Non-persistent HTTP with parallel connections? <3 points> c. Persistent HTTP? <3 points>

a) RTT 1 + RTT 2 + … + RTTn + 2 RTT 0 + 3. 2 RTT 0 = RTT^1 +^ RTT 2 +^ …^ +^ RTTn +^8 RTT^0 Or D + 6 RTT (^0)

where D is the delay incurred in P7 (the students should not get penalized twice for mistakes done in P7).

b) RTT 1 +^ RTT^2 +^ …^ +^ RTTn +^2 RTT^0 +^^2 RTT 0 = RTT^1 +^ RTT 2 +^ …^ +^ RTTn +^4 RTT^0 Or D + 2 RTT (^0)

where D is the delay incurred in P7 (the students should not get penalized twice for mistakes done in P7).

c) RTT 1 + RTT 2 + … + RTTn + 2 RTT 0 + RTT 0 = RTT^1 +^ RTT 2 +^ …^ +^ RTTn +^3 RTT^0 Or D + RTT 0

where D is the delay incurred in P7 (the students should not get penalized twice for mistakes done in P7).

12 points P9. Consider Figure 2.12, for which there is an institutional network connected to the Internet. Suppose that the average object size is 900,000 bits and that the average request rate from the institution's browsers to the origin servers is 1.5 requests per second. Also suppose that the amount of time it takes from when the router on the Internet side of the access link forwards an HTTP request until it receives the response is two seconds on average. Model the total average response time as the sum of the average access delay

b) Each super peer might store the meta-data for all of the files its

children are sharing. A super-duper peer might store all of the meta-data that its super-peer children store. An ordinary node would first send a query to its super peer. The super peer would respond with matches and then possibly forward the message to its super- duper peer. The super-duper peer would respond (through the overlay network) with its matches. The super-duper peer may further forward the query to other super-duper peers.