COE 431 Computer Networks. Welcome to Exam I Thursday April 02, Instructor: Wissam F. Fawaz

Similar documents
Q U E S T I O N 3 In the current version of IP (IPv4), the use of TCP and UDP headers differ in which of the following ways?

Computer Networks - Midterm

PLEASE READ CAREFULLY BEFORE YOU START

Expected Time: 90 min PART-A Max Marks: 42

CSE 473 Introduction to Computer Networks. Exam 1. Your name: 9/26/2013

PLEASE READ CAREFULLY BEFORE YOU START

CSE 473 Introduction to Computer Networks. Midterm Exam Review

School of Engineering Department of Computer and Communication Engineering Semester: Fall Course: CENG415 Communication Networks

Computer Networks - Midterm

CSEN 404 Introduction to Networks. Mervat AbuElkheir Mohamed Abdelrazik. ** Slides are attributed to J. F. Kurose

PLEASE READ CAREFULLY BEFORE YOU START

PLEASE READ CAREFULLY BEFORE YOU START

CSE 473 Introduction to Computer Networks. Exam 1. Your name here: 10/3/2012

CPS 706 Computer Networks (Fall 2011)

Department of Computer Science and Engineering. Final Examination. Instructor: N. Vlajic Date: April 15, 2011

PLEASE READ CAREFULLY BEFORE YOU START

Computer Network 2015 Mid-Term Exam.

Question Points Score total 100

BSc. (Hons) Web Technologies. Examinations for 2017 / Semester 1

UNIVERSITY OF TORONTO FACULTY OF APPLIED SCIENCE AND ENGINEERING

Student ID: CS457: Computer Networking Date: 3/20/2007 Name:

CMSC 332 Computer Networking Web and FTP

Final Exam for ECE374 05/03/12 Solution!!

CS 421: COMPUTER NETWORKS SPRING FINAL May 16, minutes

Web, HTTP and Web Caching

===================================================================== Exercises =====================================================================

CSEN 503 Introduction to Communication Networks

CS 455/555 Spring 2011 Weigle

Internet Technology 2/18/2016

Chapter 2 Application Layer

CS4/MSc Computer Networking. Lecture 3: The Application Layer

HyperText Transfer Protocol

Internet Technology. 06. Exam 1 Review Paul Krzyzanowski. Rutgers University. Spring 2016

CS 349/449 Internet Protocols Final Exam Winter /15/2003. Name: Course:

CSC 4900 Computer Networks:

CSE 3214: Computer Network Protocols and Applications. Midterm Examination

Name Student ID Department/Year. Midterm Examination. Introduction to Computer Networks Class#: 901 E31110 Fall 2006

CPSC 441 COMPUTER COMMUNICATIONS MIDTERM EXAM

1-1. Switching Networks (Fall 2010) EE 586 Communication and. September Lecture 10

CS 421: COMPUTER NETWORKS SPRING FINAL May 24, minutes. Name: Student No: TOT

Internet Technology 3/2/2016

c) With the selective repeat protocol, it is possible for the sender to receive an ACK for a packet that falls outside of its current window.

CS 355. Computer Networking. Wei Lu, Ph.D., P.Eng.

PLEASE READ CAREFULLY BEFORE YOU START

Midterm Exam CSCE 232: Computer Networks Fall Instructions:

15-441: Computer Networks Homework 3

FINAL Wednesday, 30 th July 2008

EECS 3214 Midterm Test Winter 2017 March 2, 2017 Instructor: S. Datta. 3. You have 120 minutes to complete the exam. Use your time judiciously.

TDTS06 Computer Networks Final Exam: 14:00-18:00, Friday, November 1, 2013

EE-311 Data Communication & Networks

Lecture 12. Application Layer. Application Layer 1

Computer Communication Networks Midterm Review

EL Wireless and Mobile Networking Spring 2002 Mid-Term Exam Solution - March 6, 2002

Data Communication & Networks Final Exam (Fall 2008) Page 1 / 13. Course Instructors: Engr. Waleed Ejaz. Marks Obtained Marks

CMPE150 Midterm Solutions

DNS and HTTP. A High-Level Overview of how the Internet works

Computer Networks. Homework #4: No Grading

ECS 152A Computer Networks Instructor: Liu. Name: Student ID #: Final Exam: March 17, 2005

Name: Personnr: Course: [ ] 1DT131 (DV, 4p) [ ] 1DT633 (MN, 5p)

Models. Motivation Timing Diagrams Metrics Evaluation Techniques. TOC Models

College of Computer and Information Sciences Department of Computer Engineering CEN444 Computer Networks Midterm 2 Exam Second Semester 1434/1435

Name Student ID Department/Year. Midterm Examination. Introduction to Computer Networks Class#: 901 E31110 Fall 2007

Name Student ID Department/Year. Midterm Examination. Introduction to Computer Networks Class#: Fall 2003

Question Score 1 / 19 2 / 19 3 / 16 4 / 29 5 / 17 Total / 100

Written examination in TDTS06 Computer Networks at 8 12

Question 1 (6 points) Compare circuit-switching and packet-switching networks based on the following criteria:

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

CSC 401 Data and Computer Communications Networks

Computer Networks. Wenzhong Li. Nanjing University

Assignment #2. Csci4211 Spring Due on March 6th, Notes: There are five questions in this assignment. Each question has 10 points.

Ch. 3 Cont.: Basic Performance Concepts

CS 421: COMPUTER NETWORKS FALL FINAL January 10, minutes

ECEN Final Exam Fall Instructor: Srinivas Shakkottai

Interprocess Communication

Operating Systems CS 571

1. What is a Computer Network? interconnected collection of autonomous computers connected by a communication technology

Application Layer Protocols

Advanced Java Programming. Networking

Lecture 6 Application Layer. Antonio Cianfrani DIET Department Networking Group netlab.uniroma1.it

UNIVERSITY OF TORONTO FACULTY OF APPLIED SCIENCE AND ENGINEERING

Final Exam Computer Networks Fall 2015 Prof. Cheng-Fu Chou

Review of Previous Lecture

BEng. (Hons) Telecommunications. Examinations for / Semester 2

a. (4pts) What general information is contained in a LSR-PDU update that A might send?

CSC 257/457 Computer Networks. Fall 2017 MW 4:50 pm 6:05 pm CSB 601

FINAL Tuesday, 20 th May 2008

JAVA SOCKET PROGRAMMING

Name Student ID Department/Year. Midterm Examination. Introduction to Computer Networks Class#: 901 E31110 Fall 2008

TDTS06: Computer Networks

Page 1. CS162 Operating Systems and Systems Programming Lecture 22. Networking III. Automatic Repeat Request

CS 421: COMPUTER NETWORKS SPRING FINAL May 21, minutes

Computer Networks. 5th of February, This exam consists of 6 questions with subquestions. Every subquestion counts for 10 points.

Chair for Network Architectures and Services Prof. Carle Department of Computer Science Technische Universität München.

Performance Modeling

OBJECT ORIENTED PROGRAMMING

CHAPTER 1. Computer Networks and the Internet

Applications & Application-Layer Protocols: The Web & HTTP

Application Layer Introduction; HTTP; FTP

A taste of HTTP v1.1. additions. HTTP v1.1: introduces many complexities no longer an easy protocol to implement. G.Bianchi, G.Neglia, V.

Duke University CompSci 356 Midterm Spring 2016

Transcription:

1 COE 431 Computer Networks Welcome to Exam I Thursday April 02, 2015 Instructor: Wissam F. Fawaz Name: Student ID: Instructions: 1. This exam is Closed Book. Please do not forget to write your name and ID on the first page. 2. You have exactly 85 minutes to complete the 6 required problems. 3. Read each problem carefully. If something appears ambiguous, please write your assumptions. 4. Do not get bogged-down on any one problem, you will have to work fast to complete this exam. 5. Put your answers in the space provided only. No other spaces will be graded or even looked at. Good Luck!!

2 Problem I: Comparing terminologies (10 minutes) [10 Points] What is the difference between each of the following pairs of concepts? 1. Active mode FTP and passive mode FTP With active mode FTP, the data connection is initiated by the server while in passive mode, the client creates the data connection. 2. Stateless HTTP and stateful HTTP Stateless HTTP does not store any information about the client while stateful HTTP does. 3. Authoritative DNS server and local DNS server Local DNS acts as a proxy forwarding DNS queries to the DNS hierarchy of servers while authoritative DNS maintains records for a given domain. 4. Canonical name and alias name Alias name is mnemonic while canonical is not. 5. ServerSocket class and DatagramSocket class ServerSocket is used to create a welcome sockets while DatagramSocket creates a UDP socket.

3 Problem II: Delays (10 minutes) [20 Points] The figure above shows a network path connecting a server to a client. 1. What is the total propagation delay for a packet going from the server to the client (you may assume that the speed of light is 200,000 Km/s)? 1 ms + 10 ms + 0.01 ms = 11.01 ms 2. What is the total transmission delay of a 5000 bit packet on all the links as it travels from the server to the client? 5 µs + 5 µs + 5 ms = 5.01 ms 3. Assume an infinite buffer size at router X and a traffic intensity of 0.9. What is the average queueing delay at X if the average packet size is 5000 bits? 1/µ=5 10-6 ; queueing delay = 1/µ ρ/(1-ρ) = 5 10-6 9 = 45 µs 4. Assume an infinite buffer size at router Y and a traffic intensity of 0.8. What is the average queueing delay at Y if the average packet size is 5000 bits? 1/µ=5 10-3 ; queueing delay = 1/µ ρ/(1-ρ) = 5 10-3 4 = 20 ms 5. Building on the above, what is the end-to-end delay experienced by a 5000 bits packet going from the server to the client? 11.01 ms + 5.01 ms + 20.045 ms = 36.065 ms

4 Problem III: Persistent and non-persistent HTTP (10 minutes) [16 Points] A user in Beirut is connected to the Internet with a 100 Mb/s (b=bits) access link. The said user retrieves a 250 KB (B=bytes) webpage from a server in London, where the page references 3 images of 500 KB each. Assume that the one way propagation delay is 75 ms and that the capacity of the user s access link is the bandwidth bottleneck for this connection. Approximately, how long does it take for the page (including images) to appear on the user s screen, assuming: 1. Non-persistent HTTP using a single connection at a time? 8 RTTs + transfer delay for 4 objects = 8 150 ms + 140 ms = 1340 ms 2. Persistent HTTP with no pipelining? 5 RTTs + transfer delay for 4 objects = 890 ms 3. Non-persistent HTTP with a maximum of 2 parallel connections? 6 RTTs + transfer delay for 4 objects = 1040 ms 4. Persistent HTTP with a maximum of 3 pipelined requests? 3 RTTs + transfer delay for 4 objects = 590 ms

5 Problem IV: Socket Programming (15 minutes) [16 Points] Suppose a Server having an IP address of 1.2.3.4 executes the following lines of Java: 1. DatagramSocket ssocket = new DatagramSocket( 4321_); 2. byte[] sdata = new byte[1024]; 3. DatagramPacket spckt = new DatagramPacket(_sData, _sdata.length ); 4. ssocket.receive(spckt); 5. System.out.println(sPckt.getPort()); 6. System.out.println(new String(sPckt.getData())); 7. System.out.println(sPckt.getAddress()); Now suppose a host with an IP of 2.3.4.5 executes the following lines to send a String to the server above: 8. DatagramSocket csocket = new DatagramSocket(1234); 9. InetAddress add = InetAddress.getByName( 1.2.3.4 ); 10. int port = 4321; 11. String str = Client 1 ; 12. byte[] cdata = str.getbytes(); 13.DatagramPacket cpckt= 14. new DatagramPacket(cData,cData.length,port,add); 15. csocket.send(cpckt); 1. Complete below the implementation of lines 1, 3, 9, 10, and 12 of the above presented code fragments? See above. 2. What output is printed to the screen when the code fragment corresponding to the server executes? 1234 Client 1 2.3.4.5 3. How many sockets are created at the server? How long the connection between the client and the server remain open? Only one. There is no connection in this case. 4. Can the provided server implementation be used to handle multiple clients? Justify your answer. No since no infinite loop is used.

6 Problem V: Putting it all together (20 minutes) [20 Points] www.b.com Authoritative DNS server for b.com 1 Gbps LAN R2 Internet 1 Mbps (in each direction) R1 m1.a.com m2.a.com HTTP cache Local DNS server 1 Gbps LAN Consider the scenario depicted in the Figure above, in which two user machines called respectively m1.a.com and m2.a.com belong to a 1 Gbps high speed LAN. The figure shows also another 1 Gbps LAN in which resides a webserver called www.b.com and an authoritative DNS server for the b.com domain called dns.b.com. The two LANs are interconnected through a 1 Mbps access link. In what follows, assume that: a) every HTTP request in the bottom LAN is first directed to the HTTP cache, b) the HTTP cache in the bottom LAN is initially empty, and c) the cache of the local DNS server present in the bottom LAN is initially empty. 1. Suppose the user at m1.a.com types in the URL www.b.com/bigfile.htm into his browser to retrieve a 1 Gbit file from www.b.com. Describe in details the step-bystep process of obtaining the file from the point that the URL is entered into the browser until the requested file is completely received by m1.a.com. In particular, list the sequence of DNS and HTTP messages that will flow through the network. M1.a.com needs to resolve the name www.b.com to an IP address so it sends a DNS REQUESTmessage to its local DNS resolver (this takes no time given the assumptions below) Local DNS server does not have any information so it contacts a root DNS server with a REQUEST message (this take 500 ms given the assumptions below)

7 Root DNS server returns name of DNS Top Level Domain server for.com (this takes 500 ms given the assumptions below) Local DNS server contacts.com TLD (this take 500 ms given the assumptions below) TLD.com server returns authoritative name server for b.com (this takes 500 ms given the assumptions below) Local DNS server contacts authoritative name server for b.com (this takes 100 ms given the assumptions below) Authoritative name server for b.com returns IP address of www.b1.com. (this takes 100 ms given the assumptions below) HTTP client sends HTTP GET message to www.b1.com, which it sends to the HTTP cache in the a.com network (this takes no time given the assumptions). The HTTP cache does not find the requested document in its cache, so it sends the GET request to www.b.com. (this takes 100 ms given the assumptions below) www.b.com receives the GE request. There is a 1 sec transmission delay to send the 1Gbps file from www.b.com to R2. If we assume that as soon as the first few bits of the file arrive at R1, that they are forwarded on the 1Mbps R2-to-R1 link, then this delay can be ignored. The 1 Gbit file (in smaller packets or in a big chunk, that s not important here) is transmitted over the 1 Mbps link between R2 and R1. This takes 1000 seconds. There is an additional 100 ms propagation delay. There is a 1 sec delay to send the 1Gbps file from R1 to the HTTP cache. If we assume that as soon as the first few bits of the file arrive at the cache, that they are forwarded to the cache, then this delay can be ignored. There is a 1 sec delay to send the 1Gbps file from the HTTP cache to m1.a.com. If we assume that as soon as the first few bits of the file arrive at the cache, that they are forwarded to the cache, then this delay can be ignored. The total delay is thus:.5 +.5 +.5 +.5 +.1 +.1 + 1 + 1000 +1+1 = 1105.2 secs (1002.2 is also an OK answer). 2. How much time does it take to accomplish the steps you outlined in your answer to the first question? Show your work. In answering this question, you can make the following assumptions: a. DNS query/reply messages and HTTP REQUEST messages are very small compared to the size of the file, and thus their transmission times can be neglected (but not their propagation times). b. Propagation delays within the LANs are small enough to be ignored. c. The propagation time from router R1 to router R2 is 100 ms. d. The propagation delay from anywhere in a.com to any other site in the Internet (except b.com) is 500 ms. (See above for answer. Note that we have neglected to account for TCP hand-shaking delays for the HTTP exchanges!)

8 3. Now assume that machine m2.a.com makes a request to exactly the same URL that was requested by m1.a.com. List the sequence of DNS and HTTP messages underlying the step-by-step process of obtaining the file from the point that the URL is entered until the browser of m2.a.com receives the file in its entirety. m2.a.com needs to resolve the name www.b.com to an IP address so it sends a DNS REQUEST message to its local DNS resolver (this takes no time given the assumptions above) The local DNS server looks in its cache and finds the IP address for www.b.com, since m1.a.com had just requested that that name be resolved, and returns the IP address to m2.b.com. (this takes no time given the assumptions above) HTTP client at m2.a.com sends HTTP GET message to www.b1.com, which it sends to the HTTP cache in the a.com network (this takes no time given the assumptions). The HTTP cache finds the requested document in its cache, so it sends a GET request with an If-Modified-Since to to www.b.com. (this takes 100 ms given the assumptions) www.b.com receives the GET request. The document has not changed, so www.b.com sends a short HTTP REPLY message to the HTTP cache in a.com indicating that the cached copy is valid. (this takes 100 ms given the assumptions) There is a 1 sec delay to send the 1Gbps file from the HTTP cache to m2.a.com. The total delay is thus:.1 +.1 + 1 = 1.2 secs 4. How much time does it take to accomplish the steps you outlined in your previous answer? Use the assumptions that were given in the second question. (Answer: see above)

9 Problem VI: Web Caches (20 minutes) [18 Points] Consider a scenario similar to the one given in Problem V. Assume that requests for objects from the www.b.com server are generated by the users of the bottom LAN at the rate of 3 requests/s. Suppose that the average object size is 500 Kbits and that the HTTP request messages are negligibly small and thus create no traffic in the network or in the access link. a) For this question, assume that there is no web cache in the bottom LAN. Find the total response time observed by a user of the bottom LAN requesting objects from www.b.com when the capacity of the access link connecting the bottom and upper LANs increases from 1 Mbps to 10 Mbps. For delay computation use, where λ is the arrival rate and ρ is the traffic intensity. Under what condition would such a solution be unnecessary? Traffic intensity on LAN1 = (3 requests/sec) (0.5 Mbits/request)/1 Gbps =0.0015 => LAN1 delay = 0.5 ms Whereas the traffic intensity on the access link is: 1.5/10 = 0.15 => Access delay = 58.8 ms Traffic intensity on LAN2 = 0.0015 => LAN2 delay = 0.5 ms Total response time = 59.8 ms b) Find the total response time when a cache with a hit rate of 0.5 is installed in the bottom LAN. What is the minimum cache hit value that is needed to reduce response time? The traffic intensity on the access link is reduced by 50% since 50% of the requests are satisfied within the institutional network. Thus, the average access delay is: (1/3*0.5) (0.75)/(1-0.75) = 2 sec Traffic intensity on LAN2 = 0.0015/2 => LAN2 delay = 0.5 ms => Total response time = 0.5 0.5 ms + 0.5 2001 = 1000.75 ms