Solutions to the Sample Questions on Application Layer



Similar documents
Computer Networks - CS132/EECS148 - Spring

Homework 2 assignment for ECE374 Posted: 02/20/15 Due: 02/27/15

First Midterm for ECE374 03/24/11 Solution!!

loss-tolerant and time sensitive loss-intolerant and time sensitive loss-intolerant and time insensitive

Application Layer. CMPT Application Layer 1. Required Reading: Chapter 2 of the text book. Outline of Chapter 2

First Midterm for ECE374 03/09/12 Solution!!

COMP 361 Computer Communications Networks. Fall Semester Midterm Examination

1. The Web: HTTP; file transfer: FTP; remote login: Telnet; Network News: NNTP; SMTP.

Transport Layer Protocols

1 Introduction: Network Applications

Homework 2 assignment for ECE374 Posted: 02/21/14 Due: 02/28/14

Midterm Exam CMPSCI 453: Computer Networks Fall 2011 Prof. Jim Kurose

Note! The problem set consists of two parts: Part I: The problem specifications pages Part II: The answer pages

Final for ECE374 05/06/13 Solution!!

Computer Networks & Security 2014/2015

Application Layer. Abusayeed Saifullah. CS 5600 Computer Networks. These slides are adapted from Kurose and Ross

First Midterm for ECE374 02/25/15 Solution!!

CSCI-1680 CDN & P2P Chen Avin

HW2 Grade. CS585: Applications. Traditional Applications SMTP SMTP HTTP 11/10/2009

Domain Name System (DNS)

Lecture 28: Internet Protocols

Introduction to Computer Networks

Indian Institute of Technology Kharagpur. TCP/IP Part I. Prof Indranil Sengupta Computer Science and Engineering Indian Institute of Technology

COMP 3331/9331: Computer Networks and Applications. Lab Exercise 3: TCP and UDP (Solutions)

Applications. Network Application Performance Analysis. Laboratory. Objective. Overview

Chapter 2 Application Layer. Lecture 5 FTP, Mail. Computer Networking: A Top Down Approach

Cape Girardeau Career Center CISCO Networking Academy Bill Link, Instructor. 2.,,,, and are key services that ISPs can provide to all customers.

The exam has 110 possible points, 10 of which are extra credit. There is a Word Bank on Page 8. Pages 7-8 can be removed from the exam.

Computer Networks Homework 1

Network Technologies

CSIS CSIS 3230 Spring Networking, its all about the apps! Apps on the Edge. Application Architectures. Pure P2P Architecture

First Semester Examinations 2011/12 INTERNET PRINCIPLES

DATA COMMUNICATOIN NETWORKING

DNS and P2P File Sharing

CS43: Computer Networks . Kevin Webb Swarthmore College September 24, 2015

Note! The problem set consists of two parts: Part I: The problem specifications pages Part II: The answer pages

CS 5480/6480: Computer Networks Spring 2012 Homework 1 Solutions Due by 9:00 AM MT on January 31 st 2012

Distributed Systems. 2. Application Layer

Chapter 2 Application Layer

Communications and Networking

Internet Concepts. What is a Network?

Network Models and Protocols

Application layer Protocols application transport

Application-layer protocols

CS640: Introduction to Computer Networks. Applications FTP: The File Transfer Protocol

Computer Networks 1 (Mạng Máy Tính 1) Lectured by: Dr. Phạm Trần Vũ MEng. Nguyễn CaoĐạt

Networks University of Stirling CSCU9B1 Essential Skills for the Information Age. Content

TSIN02 - Internetworking

Advanced Higher Computing. Computer Networks. Homework Sheets

DATA COMMUNICATOIN NETWORKING

ECE 358: Computer Networks. Homework #3. Chapter 5 and 6 Review Questions 1

CSE 473 Introduction to Computer Networks. Exam 2 Solutions. Your name: 10/31/2013

Remote login (Telnet):

Application Layer -1- Network Tools

The BitTorrent Protocol

Network Applications

Networking Test 4 Study Guide

Chapter 2 Application Layer

Network Measurement. Why Measure the Network? Types of Measurement. Traffic Measurement. Packet Monitoring. Monitoring a LAN Link. ScienLfic discovery

Applications & Application-Layer Protocols: The Domain Name System and Peerto-Peer

Lecture 2-ter. 2. A communication example Managing a HTTP v1.0 connection. G.Bianchi, G.Neglia, V.Mancuso

The Role and uses of Peer-to-Peer in file-sharing. Computer Communication & Distributed Systems EDA 390

Computer Networking LAB 2 HTTP

Communications Software. CSE 123b. CSE 123b. Spring Lecture 13: Load Balancing/Content Distribution. Networks (plus some other applications)

VPN. Date: 4/15/2004 By: Heena Patel

Introduction: Why do we need computer networks?

FTP: the file transfer protocol

Single Pass Load Balancing with Session Persistence in IPv6 Network. C. J. (Charlie) Liu Network Operations Charter Communications

PART-A Questions. 9. What are the two parts of message inside the envelope?

Web Browsing Examples. How Web Browsing and HTTP Works

CSCI Topics: Internet Programming Fall 2008

New York University Computer Science Department Courant Institute of Mathematical Sciences

Networking Applications

Datagram-based network layer: forwarding; routing. Additional function of VCbased network layer: call setup.

EINDHOVEN UNIVERSITY OF TECHNOLOGY Department of Mathematics and Computer Science

Computer Networks. Examples of network applica3ons. Applica3on Layer

SFWR 4C03: Computer Networks & Computer Security Jan 3-7, Lecturer: Kartik Krishnan Lecture 1-3


EE 7376: Introduction to Computer Networks. Homework #3: Network Security, , Web, DNS, and Network Management. Maximum Points: 60

CS335 Sample Questions for Exam #2

CPS221 Lecture: Layered Network Architecture

Semantic based Web Application Firewall (SWAF V 1.6) Operations and User Manual. Document Version 1.0

The Application Layer: DNS

2- Electronic Mail (SMTP), File Transfer (FTP), & Remote Logging (TELNET)

Final Exam. Route Computation: One reason why link state routing is preferable to distance vector style routing.

architecture: what the pieces are and how they fit together names and addresses: what's your name and number?

CS101 Lecture 19: Internetworking. What You ll Learn Today

HTTP. Internet Engineering. Fall Bahador Bakhshi CE & IT Department, Amirkabir University of Technology

D. SamKnows Methodology 20 Each deployed Whitebox performs the following tests: Primary measure(s)

Computer Networks UDP and TCP

DNS Basics. DNS Basics

Computer Networks. Instructor: Niklas Carlsson

Protocol Data Units and Encapsulation

The Web: some jargon. User agent for Web is called a browser: Web page: Most Web pages consist of: Server for Web is called Web server:

CS 356 Lecture 27 Internet Security Protocols. Spring 2013

Computer Networks CS321

CSE331: Introduction to Networks and Security. Lecture 12 Fall 2006

Basic Networking Concepts. 1. Introduction 2. Protocols 3. Protocol Layers 4. Network Interconnection/Internet

CS3250 Distributed Systems

M3-R3: INTERNET AND WEB DESIGN

Transcription:

Solutions to the Sample Questions on Application Layer 1) Why is SMTP not used for transferring e-mail messages from the recipient s mail server to the recipient s personal computer? Answer: Whereas 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. 2) THIS WILL BE SOLVED IN THE FIRST TUTORIAL. 3) Why do you think DNS uses UDP, instead of TCP, for its query and response messages? Answer: TCP involves a establishment phase while UDP does not. Using TCP for DNS may end up involving several TCP s 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. 4) 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 applicationlayer 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. 5) In what way is instant messaging a hybrid of client-server and P2P architecture? Answer: Instant Messaging involves the initiator to contact a centralized server to locate the address (IP address.) of the receiver: client server model. After this, the instant messaging can be peer to peer message between the two communicating parties are sent directly between them. 6) Multiple Choice Questions Choose one from the possible choices: A) Suppose a client sends an HTTP request message with the If-modified-since: header. Suppose the object in the server has not changed since the last time that client retrieved the object. Then the server will send a response message with the status code: (i) 304 Not Modified (ii) 404 Not Found (iii) 200 OK (iv) 403 Permission Denied (v) None of the above 1

B) Which of the following is used to contain an Internet standard? (i) RFC (ii) IETF (iii) DNS (iv) PPP (v) None of the above C) HTTP request and response messages are not humanly readable (i) True (ii) False D) All SMTP e-mail messages must be in 8-bit ASCII (i) True (ii) False E) Which of the following protocols uses out-of-band signalling? (i) HTTP (ii) SMTP (iii) FTP (iv) All of the above (v) None of the above 7) 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 results 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. 8) 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. 2

Answer: (a) Non-persistent HTTP CLIENT Initiate TCP SERVER Accept TCP Send request for base HTML page Receive response and close. Parse page and find that there are 3 objects. Initiate new TCP the web page & close Accept TCP Send request for first object Receive object and open new TCP the object & close REPEAT ABOVE FOR THE REMAINING TWO OBJECTS (b) Persistent HTTP without pipelining CLIENT Initiate TCP Send request for base HTML page Receive response. Parse page and find that there are 3 objects. Request for first object Send request for second object Send request for third object Receive object and close SERVER Accept TCP the web page and send back first object Respond with second object Respond with third object and close 3

(c) Persistent HTTP with pipelining CLIENT Initiate TCP Send request for base HTML page Receive response. Parse page and find that there are 3 objects. Send back-to-back requests for all 3 objects Receive objects and close SERVER Accept TCP the web page and send back the 3 objects back-to-back and close 9) 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 RTT 1,.., RTT n. Further suppose that the web page associated with the link contains exactly one object, consisting of a small amount 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? (EXAM PROBLEM FROM PAST SESSIONS) Answer: The total amount of time to get the IP address is RTT 1 + RTT 2 +. + RTT n. Once the IP address is known, RTT elapses to set up the TCP and another O RTT O elapses to request and receive the small object. The total response time is 2RTT 0 + RTT 1 + RTT 2 +. + RTT n. 10) In the lecture we solved a problem, which involved finding the total delay incurred in downloading objects assuming that the web cache hit ratio was 40%. Now assume that the cache hit rate is 50% (i.e. 50% of the requests are satisfied locally from the web cache). The rest of the parameters are the same as in that problem. The average delay to download the objects is: (a) between 1.2 and 1.3 seconds (b) greater than two seconds (c) between 1.0 and 1.1 seconds (d) none of the above Answer: In this case, 50% of the requests will be satisfied by the orign servers. Hence the utilization of the access link reduces to 50%, resulting in negligible delays (say < 10 msec). Total average delay for unsatisfied requests = Internet delay + access delay + LAN delay < 2.01 sec 4

Overall Delay = 0.5*(2.01) + 0.5*(0.01) <1.01 seconds Hence the correct answer is (c). 11) and 12) Please refer to Page 7. 13) 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. 14) Consider distributing a file of F = 10 Gbits to N peers. The server has an upload rate of u s = 20Mbps, and each peer has a download rate of d i = 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: D cs = max {NF/u s, F/d min } Similarly, for calculating the minimum distribution time for P2P distribution, we use the following formula: DP 2 P = max{f/u s, F/dmin, NF/(us +! ui)} where, F = 10 Gbits = 10 * 1024 Mbits u s = 20 Mbps d min = d i = 1 Mbps N i= 1 5

Client Server N 10 100 1000 200 Kbps 10240 51200 512000 u 600 Kbps 10240 51200 512000 1 Mbps 10240 51200 512000 Peer to Peer N 10 100 1000 200 Kbps 10240 25904.3 47559.33 u 600 Kbps 10240 13029.6 16899.64 1 Mbps 10240 10240 10240 6

11) A DHT (as we studied it) is a pure overlay network. Consequently, the assignment of keys to the peers does not take into account the underlying network topology. Do you think this may have an impact of the search performance? Answer: Yes. The delay between successive nodes in DHT can be high because they may be separated by a long distance. It is also possible that the throughput between two successive nodes is low because the underlying network has a low bandwidth. 12) Consider the circular DHT example that we discussed in the lecture (see the relevant slides for the discussion on DHT). Explain how peer 6 would join the DHT. You may assume 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. 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.