There are 10 questions in total. Please write your SID on each page.

Similar documents
Department of EECS - University of California at Berkeley EECS122 - Introduction to Communication Networks - Spring 2005 Final: 5/20/2005

Computer Networks (Fall 2011) Homework 2

EECS 122: Introduction to Communication Networks Final Exam Solutions

CSE 473 Introduction to Computer Networks. Final Exam. Your name here: 12/17/2012

EE122 Spring 2001 Final

COMP3331/9331 XXXX Computer Networks and Applications Final Examination (SAMPLE SOLUTIONS)

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

CS164 Final Exam Winter 2013

Transport Layer PREPARED BY AHMED ABDEL-RAOUF

Problem 7. Problem 8. Problem 9

Congestion control in TCP

King Fahd University of Petroleum and Minerals College of Computer Sciences and Engineering Department of Computer Engineering

No, the bogus packet will fail the integrity check (which uses a shared MAC key).!

CS244a: An Introduction to Computer Networks

Transmission Control Protocol. ITS 413 Internet Technologies and Applications

TCP OVER AD HOC NETWORK

Q23-5 In a network, the size of the receive window is 1 packet. Which of the follow-ing protocols is being used by the network?

CS 421: COMPUTER NETWORKS FALL FINAL January 10, minutes

Reliable Transport II: TCP and Congestion Control

TCP Congestion Control

CS132/EECS148 - Instructor: Karim El Defrawy Midterm Spring 2013 Time: 1hour May 2nd, 2013

CMPE150 Midterm Solutions

Answers to Sample Questions on Transport Layer

Review problems (for no credit): Transport and Network Layer

Communication Networks

CS 344/444 Computer Network Fundamentals Final Exam Solutions Spring 2007

CS 421: COMPUTER NETWORKS SPRING FINAL May 16, minutes

CMSC 417. Computer Networks Prof. Ashok K Agrawala Ashok Agrawala. October 30, 2018

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

ECE 610: Homework 4 Problems are taken from Kurose and Ross.

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

EE122 MIDTERM EXAM: Scott Shenker, Ion Stoica

CMPE 257: Wireless and Mobile Networking

PROBLEMSAND EXERCISES

Data Communication Networks Final

UNIT IV -- TRANSPORT LAYER

MCS-377 Intra-term Exam 1 Serial #:

EE 122 Fall st Midterm. Professor: Lai Stoica

CSE 473 Introduction to Computer Networks. Exam 2. Your name here: 11/7/2012

Congestion Control In The Internet Part 2: How it is implemented in TCP. JY Le Boudec 2014

Congestion Control 3/16/09

cs/ee 143 Communication Networks

Chapter 3 Review Questions

Congestion Control In The Internet Part 2: How it is implemented in TCP. JY Le Boudec 2014

Homework #4. Due: December 2, 4PM. CWND (#pkts)

Congestion Control In The Internet Part 2: How it is implemented in TCP. JY Le Boudec 2015

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

ECEN Final Exam Fall Instructor: Srinivas Shakkottai

CS 421: COMPUTER NETWORKS SPRING FINAL May 21, minutes

COMPUTER NETWORK. Homework #3. Due Date: May 22, 2017 in class

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

Impact of transmission errors on TCP performance. Outline. Random Errors

Midterm Exam CSCE 232: Computer Networks Fall Instructions:

CS 421: COMPUTER NETWORKS FALL FINAL January 5, minutes. Name: Student No: TOT

CS 421: COMPUTER NETWORKS FALL FINAL January 12, minutes

Exercises TCP/IP Networking With Solutions

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

Token Rate Bucket Size

Congestion Control In The Internet Part 2: How it is implemented in TCP. JY Le Boudec 2015

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

PLEASE WRITE NEATLY I need to be able to read your answers! (seemingly encrypted solutions can not be decrypted!)

Transport Layer Congestion Control

Reliable Transport II: TCP and Congestion Control

Page 1. Review: Internet Protocol Stack. Transport Layer Services EEC173B/ECS152C. Review: TCP. Transport Layer: Connectionless Service

cs/ee 143 Fall

ECSE 414 Fall 2014 Final Exam Solutions

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

Midterm Review EECS 122. University of California Berkeley

Homework 3 1 DNS. A root. A com. A google.com

Lecture 21: Congestion Control" CSE 123: Computer Networks Alex C. Snoeren

Assignment 7: TCP and Congestion Control Due the week of October 29/30, 2015

First Semester Examinations 2015/16 (Model Solution) INTERNET PRINCIPLES

CSE 473 Introduction to Computer Networks. Midterm Exam Review

Page 1. Review: Internet Protocol Stack. Transport Layer Services. Design Issue EEC173B/ECS152C. Review: TCP

Chapter III: Transport Layer

cs/ee 143 Fall

CS 5520/ECE 5590NA: Network Architecture I Spring Lecture 13: UDP and TCP

TCP congestion control:

Mohamed Khedr.

ECE4110, Internetwork Programming, QUIZ 2 - PRACTICE Spring 2006

Outline Computer Networking. TCP slow start. TCP modeling. TCP details AIMD. Congestion Avoidance. Lecture 18 TCP Performance Peter Steenkiste

Lecture 4: Congestion Control

8. TCP Congestion Control

Computer Networking

CSCD 330 Network Programming Winter 2015

Computer Networks Spring 2017 Homework 2 Due by 3/2/2017, 10:30am

TCP Congestion Control

TCP Congestion Control

PLEASE READ CAREFULLY BEFORE YOU START

CS 421: COMPUTER NETWORKS SPRING FINAL May 8, minutes

CSCI Topics: Internet Programming Fall 2008

Lecture 14: Congestion Control"

Multiple Access Links and Protocols

Data Link Control Protocols

CS244a: An Introduction to Computer Networks

IEEE , Token Rings. 10/11/06 CS/ECE UIUC, Fall

TCP Congestion Control in Wired and Wireless networks

Network Management & Monitoring

Homework 1. Question 1 - Layering. CSCI 1680 Computer Networks Fonseca

ECE 544 Computer Networks II Mid-Term Exam March 29, 2002 Profs. D. Raychaudhuri & M. Ott

Transcription:

Name: SID: Department of EECS - University of California at Berkeley EECS122 - Introduction to Communication Networks - Spring 2005 to the Final: 5/20/2005 There are 10 questions in total. Please write your SID on each page. Question 1 (10 points) The statements are true/false (T/F); mark the appropriate choice. 1. [X]T [ ]F. Prefix-based addressing contributes to the scalability of the Internet. 2. [X]T [ ]F. Packet-switching supports widely different connection types and link rates. 3. [ ]T [X]F. The end-to-end principle is a set of rules for guaranteeing the quality of connections. 4. [ ]T [X]F. The address resolution protocol is needed when different hosts have the same IP address. 5. [ ]T [X]F. Generalized processor sharing is not used in routers because it is less efficient than weighted fair queuing. 1

Question 2 (10 points) The following questions are multiple choice. Select the ONE answer that you think fits best. 1. Imagine ten packet flows, each controlled by a token bucket with size S bits and rate R bps. These flows go through one single router queue with bit rate C. The queue is initially empty. If C > 10R, then the maximum queuing delay cannot exceed (a) S/(10R) (b) 10S/C (c) S/R (d) None of the above. 2. Which one of the following is false? (a) Ethernet does not use a NAV (network allocation vector) in the header. (b) Wireless networks have higher propagation delay than wired ones. (c) Wired networks such as Ethernet do not have the hidden node problem. (d) Wired networks such as Ethernet do not have the exposed node problem. 3. Which of the following is a well-formed IP address? (a) inst.eecs.berkeley.edu (b) 00-E0-B8-49-52-67 (c) 216.67.5.003 (d) 264.112.34.9 4. To minimize the routing overhead in Ad-Hoc networks, following ideas are incorporated in the proposed routing protocols: (a) Perform routing on-demand basis. (b) Reduce the number of nodes involved in routing by delegating the networking routing function to only some of the neighborhood nodes. (c) First attempt to perform pro-active routing updates only along the optimal paths determined previously. (d) All of the above. 5. The RTS/CTS mechanism in infrastructure 802.11 Wireless LANs solves: (a) Exposed node problem. (b) Hidden node problem. (c) Both exposed and hidden node problems. (d) None of the above. 2

Figure 1: Diagrams for Question 3. Question 3 (12 points) Consider a TCP connection that, at time 0, is in the congestion avoidance phase with a window size equal to 6 MSS and then sends packets {1, 2,..., 6}. (The connection has sent packets before that were properly acknowledged.) All the packets have a length equal to one MSS. The round-trip time is very large compared to one packet transmission time. Packets 1 and 2 are lost. No other packet or ACK is lost. To be specific, let RTT = 8, transmission time = 1, timeout = 24. (a) (6 points) Assume the sender does not implement fast retransmit nor fast recovery. After a timeout, it restarts in slow start. Draw a timing diagram that shows the transmission of the first eight packets by completing Figure 1 (1). Indicate the significant events, such as start of slow start (SS) or of congestion avoidance (CA) and the relevant congestion window sizes. (b) (6 points) Repeat the previous problem assuming that the host uses fast retransmit and fast recovery. Complete Figure 1 (2). Indicate the significant events, such as start of slow start (SS) or of congestion avoidance (CA) and the relevant congestion window sizes. Hint: When fast recovery begins, the window is set to CWND/2+3, and incremented by 1 with every subsequent duplicate ACK. When ACK for the retransmitted packet is received, the window is reset to half of the original CWND. See Figure 1. 3

Question 4 (6 points) Alice wants to send a document P to Bob. She wants Bob to be certain that the document has been sent by her. Explain how they can achieve that objective using public key cryptography. One basic method is for Alice to send C := D(P ; Alice), i.e., the text obtained by applying the decryption algorithm specific to Alice. Bob can calculate E(C; Alice) since the encryption rule for Alice is public. One has E(C; Alice) = P because E() and D() are inverse functions of one another. To be more secure, Alice could send C := D(P H(P ); Alice) where H(.) is an agreed upon hash function. This step reduces the possibility that Eve could calculate some P = E(C ; Alice) and pretend that she sent the text P by transmitting C = D(P ; Alice). Indeed, it is very unlikely that Eve could find a C with the property that P H(P ) = E(C ; Alice) for a meaningful P that Eve would care about making Bob that Alice sent it. 4

Question 5 (15 points) Consider a commercial 10 Mbps Ethernet configuration with one hub (i.e., all end stations are in a single collision domain). (a) (4 points) Find Ethernet efficiency for transporting 512 byte packets (including Ethernet overhead) assuming that the propagation delay between the communicating end stations is always 25.6 µs, and that there are many pairs of end stations trying to communicate. Efficiency = 1/(1 + 5a) where a = 25.6 10 6 /(8 512 10 7 ) = 0.0625 Efficiency = 1/(1 + 5 0.0625) = 0.76 (b) (3 points) Now consider an application making use of TCP/IP/Ethernet for the same scenarios as in (a). Assume that the overheads of TCP, IP, and Ethernet are 20, 20, and 26 bytes, respectively. How much total bandwidth is available at the application layer in this network? Total overhead = 66 bytes Total application layer bandwidth available = 10 0.76 (512 66)/512 Mbps = 6.62 Mbps (c) (4 points) Recall that the maximum efficiency of Slotted Aloha is 1/e. Find the threshold for the frame size (including Ethernet overhead) such that Ethernet is more efficient than Slotted Aloha if the fixed frame size is larger than this threshold. Explain why Ethernet becomes less efficient as the frame size becomes smaller. We want 1/(1 + 5a) > 1/e 1 + 5a < e or a < (e 1)/5 = 0.34 Let L bytes be the threshold frame size. Then, 25.6 10 6 /(L 8 10 7 ) < 0.34 L > 25.6/(0.34 8 10 1 ) 94 bytes 5

(d) (4 points) Consider an 802.11b Wireless LAN (WLAN) operating at 10 Mbps and with fixed size frames. Assume we are operating without using RTS/CTS. Ignore the effect of propagation delay for the WLAN. Recall that each frame incurs the overhead of DIFS, Collision Window, ACK, and SIFS. Assume the combined overhead of DIFS, ACK, and SIFS to be 200 µs. Further assume that the average Collision Window size is 1.5 times the transmission time of the frame. Give an expression for the WLAN efficiency. Find the range of fixed frame size where Ethernet is more efficient compared to WLAN. Ethernet efficiency = X/(X + 5 25.6 10 6 ) WLAN efficiency = X/(X + 200 10 6 + 1.5 X) Hence, for Ethernet to be more efficient, we must have 200 10 6 +1.5 X > 5 25.6 10 6 Ethernet is more efficient for all frame sizes! 6

Figure 2: Diagram for Question 6. Question 6 (13 points) Consider the configuration shown on Figure 2. Hosts A, B, and C are connected to each other via a router. The bandwidths of the links A-R and R-B are R 1 and R 2 respectively. The roundtrip time is the same between A-B, C-B and A-C. (a) (8 points) Consider Figure 2. The rates for flows from A to B and C to B are x and y respectively. What are the values of x and y (as functions of R 1 and R 2 ) to which TCP converges? Figure 3 shows a diagram showing the sequence of rates (marked with solid lines) for specific values of R 1 and R 2. Explain the rate changes occuring according to AIMD in Figure 3. You may assume that the transmission times are negligible. Generally, the two flows will share bandwidth equally on the R-B link. However, depending on the values of R 1 and R 2, this may or may not be possible. So, we look at it case by case: 1. R 1 < R 2 /2: In this case, R 1 is the bottleneck for flow from A to B. Therefore, x = R 1 and y = R 2 x = R 2 R 1. 2. R 1 R 2 /2: In this case, bandwidth will be equally by both the flows on the R-B link. Therefore, x = y = R 2 /2. Now consider Figure 3. Some of the points have been labeled as A, B, C, D, E, F or G. The figure shows TCP behavior for a specific case of R 1 < R 2 /2. As a result, the optimal point is x = R 1, y = R 2 R 1, which has been marked with a solid circle. Point A is the starting point for the flows. Since x + y < R 2, additive increase keeps increasing x, y along the solid line AB (with slope 1) until it x + y > R 2 at B. So, at B, both the flows start dropping packets and multiplicative decrease (by a factor of 2) causes the rates to move to C. The rates then again undergo additive increase along the line CD until x + y > R 2 at D. Multiplicative decrease causes the rates to move to point E. Additive increase occurs again until we reach point F. At F, x + y < R 2 but x > R 1, therefore, x undergoes multiplicative decrease while y still keeps increasing. 7

So, we now reach point G. Additive increase from G causes us to reach D and then E, F, G, and so on. Thus, for this special case, the rates oscillate along two different lines! (b) (5 points) Suppose another flow from A to C is also started (see Figure 4). Denote the rate of the additional flow as z. What are the values of x, y and z (as functions of R 1 and R 2 ) to which TCP converges? The key point here is to realize that one of the links will be shared equally by the flows on that link. Now, we look at the two possible cases: 1. R 1 < R 2 : In this case x = z = R 1 /2. Therefore, y = R 2 x = R 2 (R 1 /2). 2. R 1 R 2 : In this case x = y = R 2 /2. Therefore, z = R 1 x = R 1 (R 2 /2). 8

Figure 3: Diagram for Question 6(a). This shows the sequence of rates for specific values of R 1 and R 2. The points on the solid lines are the rates (x and y). Figure 4: Diagram for Question 6(b). 9

Figure 5: Diagram for Question 7. Question 7 (10 points) Consider the network configuration shown in Figure 5. Assume that each link has the same cost. (a) (5 points) Run Bellman-Ford algorithm on this network to compute the routing table for the node A. Show A s distances to all other nodes at each step. The following table shows the routing table for A at each step until convergence. A B C D E F G H I 0 1 1 1 0 1 1 2 2 2 1 0 1 1 2 3 2 3 2 1 (b) (5 points) Suppose the link A-B goes down. As a result, A advertises a distance of infinity to B. Describe in detail a scenario where C takes a long time to learn that B is unreachable. A advertizes a distance of infinity to B, but, C and I advertize a distance of 2 to B. Depending on the ordering of these messages, this might happen: I upon knowing that B can be reached from C with distance 2, concludes that it can reach B with a distance of 3 (via C) and advertises this to A. A concludes that it can reach B with a distance of 4 (via I), and advertises this to C. C concludes that it can reach B with a distance of 5 (via A). This continues forever if the distances are unbounded. This is called the count-to-infinity problem. 10

Question 8 (5 points) Your local telephone company is adding DSL service to its existing network, and they need your help! From their frequency spectrum they have allotted the frequency band from 200-800 khz, allowing simultaneous voice communication at 300-3300hz.The signal to noise ratio is 30dB (to simplify your calculations, you can consider log 2 (1001) = 10). (a) (3 points) What is the capacity of this link? 6 Mbps (b) (2 points) Should they advertise service with this link rate to their customers? Why or why not? No. This is the theoretical maximum capacity of the link. The rate that they will obtain will be lower. 11

!" #$ " Figure 6: Diagram for Question 9. Question 9 (10 points) Consider the scenario shown in Figure 6. Host A is sending tiny packets to hosts B and C (neglect transmission time, just consider latency). Q is a store-and-forward switch with an average arrival rate of 10-Gbps and a buffer that contains 16 megabytes (base 10) of packets on average. (a) (2 points) What is the average delay that packets will incur going through the switch? Littles result: 16 8 10 6 = delay 10 10 9 Delay =.0128s = 12.8ms = 12800µs 12

(b) (2 points) What is the latency between A and B? Prop of A-Q = 10km 4µs/km = 40µs Q-B = 10km 5µs/km = 50µs Latency = 40µs + 50µs + 12800µs = 12890µs (c) (2 points) What is the latency between A and C? Prop of A-Q = 10km 4µs/km = 40µs Q-C = 10km 4µs/km = 40µs Latency = 40µs + 40µs + 12800µs = 12880µs (d) (2 points) What is the latency between B and C? Prop of B-C = 0.5km 4µs/km = 2µs Latency = 2µs (e) (2 points) Without changing the network, can you propose a solution to decrease the delay between A and B? The A-B delay can be decreased if you follow the route from A-C and then go from C-B. 12880µs + 2µs = 12882µs < 12890µs 13

Question 10 (9 points) Below is the DNS record for a fictitious corporation, OK Computer: Name Type Value TTL (seconds) okcomputer.com A 164.32.15.98 86400 (1 day) okcomputer.com NS thom.yorke.net 86400 okcomputer.com NS karma.okcomputer.com 86400 okcomputer.com MX android.okcomputer.com 60 lucky.okcomputer.com A 164.32.12.8 86400 www.okcomputer.com CNAME lucky.okcomputer.com 86400 android.okcomputer.com A 164.32.15.99 86400 (a) (3 points) If you type http://www.okcomputer.com into your web browser, to which IP address will your web browser connect? www is a CNAME for lucky, whose IP is 164.32.12.8 (b) (3 points) If you send an e-mail to thom@okcomputer.com, to which IP address will the message get delivered? The mail exchanger for okcomputer.com is android, whose IP is 164.32.15.99 (c) (3 points) The TTL field refers to the maximum amount of time a DNS server can cache the record. Give a rationale for why most of the TTLs were chosen to be 86400 seconds (1 day) instead of a shorter or a longer time, and why the MX record was chosen to have a 60-second TTL? The TTL field tells the DNS server how long it may cache the record. Generally, DNS records do not frequently change, so a fairly large TTL is possible. However, if a record does change, the domain could be inaccessible for up to TTL time. 86400 seconds, or one day, is a good tradeoff. Okcomputer.coms administrators decided that they could handle one day of downtime if their IPs change. The MX record is required for delivery of e-mail. They do not want any messages lost if their IP changes, so one day of downtime is unacceptable. As a result, the record expires after only 60 seconds, and is thus resolved almost every time an email is sent. 14