Computer Network (2012 Spring) Homework Answer. Chapter2

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

Solutions for Chapter similar to 1 and 3

CPE 548 Exam #1 (50 pts) February 17, 2016

Computer Networks Summer 2013

Reliable Transmission

CS 640 Introduction to Computer Networks. Role of data link layer. Today s lecture. Lecture16

Islamic University of Gaza Faculty of Engineering Department of Computer Engineering ECOM 4021: Networks Discussion. Chapter 2.

Direct Link Networks (II)

CSCI-1680 Link Layer I Rodrigo Fonseca

CPE 448/548 Exam #1 (100 pts) February 14, Name Class: 448

Point-to-Point Links. Outline Encoding Framing Error Detection Sliding Window Algorithm. Fall 2004 CS 691 1

Data Link Control Protocols

ECE 4450:427/527 - Computer Networks Spring 2017

Computer Network. Direct Link Networks Reliable Transmission. rev /2/2004 1

Error Detection Codes. Error Detection. Two Dimensional Parity. Internet Checksum Algorithm. Cyclic Redundancy Check.

CS/ECE 438: Communication Networks for Computers Spring 2018 Midterm Examination Online

CSCI-1680 Link Layer Reliability Rodrigo Fonseca

CSE 123: Computer Networks

Computer and Network Security

Direct Link Communication I: Basic Techniques. Data Transmission. ignore carrier frequency, coding etc.

Today. Last Time. Motivation. CAN Bus. More about CAN. What is CAN?

CSCI-1680 Link Layer Reliability John Jannotti

Housekeeping. Fall /5 CptS/EE 555 1

Getting Connected (Chapter 2 Part 4) Networking CS 3470, Section 1 Sarah Diesburg

CSMC 417. Computer Networks Prof. Ashok K Agrawala Ashok Agrawala Set 4. September 09 CMSC417 Set 4 1

Networking Link Layer

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

CS 123: Lecture 12, LANs, and Ethernet. George Varghese. October 24, 2006

Telematics. 5rd Tutorial - LLC vs. MAC, HDLC, Flow Control, E2E-Arguments

Data Link Layer, Part 5. Medium Access Control

High Level View. EE 122: Ethernet and Random Access protocols. Medium Access Protocols

CSCI 466 Midterm Networks Fall 2011

Data Communication Networks Final

Solutions to Select Exercises

CIS 551 / TCOM 401 Computer and Network Security. Spring 2007 Lecture 7

EE 122: Error detection and reliable transmission. Ion Stoica September 16, 2002

EE 122: Ethernet and

Ethernet. Introduction. CSE 3213 Fall 2011

CS 421: COMPUTER NETWORKS SPRING FINAL May 16, minutes

CS 716: Introduction to communication networks. - 9 th class; 19 th Aug Instructor: Sridhar Iyer IIT Bombay

Problem Statement. Physical and Data Link Layer Overview. Five Tasks Encoding. Make two computers talk to each other

Links Reading: Chapter 2. Goals of Todayʼs Lecture. Message, Segment, Packet, and Frame

CSE 123: Computer Networks

ECE 653: Computer Networks Mid Term Exam all

CS 421: COMPUTER NETWORKS SPRING FINAL May 8, minutes

Data Link Layer, Part 3 Medium Access Control. Preface

SRI RAMAKRISHNA INSTITUTE OF TECHNOLOGY DEPARTMENT OF INFORMATION TECHNOLOGY COMPUTER NETWORKS UNIT - II DATA LINK LAYER

Links. CS125 - mylinks 1 1/22/14

High Level View. EE 122: Error detection and reliable transmission. Overview. Error Detection

Communication and Networks. Problems

Problem Set Name the 7 OSI layers and give the corresponding functionalities for each layer.

COMP476 Networked Computer Systems. Polling. Sharing the Wire. LAN Technologies. COMP476 Networked Computer Systems 1

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

2.4 Error Detection Bit errors in a frame will occur. How do we detect (and then. (or both) frames contains an error. This is inefficient (and not

CSCI 466 Midterm Networks Fall 2011

Computer Science Engineering Sample Papers

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

Direct Link Communication I: Basic Techniques. Data Transmission. ignore carrier frequency, coding etc.

Data Link Layer: Overview, operations

ECSE 414 Fall 2014 Final Exam Solutions

Computer Networks Medium Access Control. Mostafa Salehi Fall 2008

Overview. Performance metrics - Section 1.5 Direct link networks Hardware building blocks - Section 2.1 Encoding - Section 2.2 Framing - Section 2.

Networking Technologies and Applications

Data Link Control. Surasak Sanguanpong Last updated: 11 July 2000

Chapter 3. The Data Link Layer. Wesam A. Hatamleh

CS 4453 Computer Networks Winter

FINAL May 21, minutes

Lecture 5. Homework 2 posted, due September 15. Reminder: Homework 1 due today. Questions? Thursday, September 8 CS 475 Networks - Lecture 5 1

Lecture 6 The Data Link Layer. Antonio Cianfrani DIET Department Networking Group netlab.uniroma1.it

Chapter 11 Data Link Control 11.1

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

CS 421: COMPUTER NETWORKS SPRING FINAL May 21, minutes

CSE/EE 461 Section 2

Problem Session Encode:

ECSE-4670: Computer Communication Networks (CCN) Informal Quiz 3

Medium Access Protocols

The Link Layer II: Ethernet

Packet? No. SenseCarrier. Discard packet attempts < 16. attempts == 16

CSCI-1680 Link Layer Wrap-Up Rodrigo Fonseca

6th Slide Set Computer Networks

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

Topics. Link Layer Services (more) Link Layer Services LECTURE 5 MULTIPLE ACCESS AND LOCAL AREA NETWORKS. flow control: error detection:

CSCI-1680 Link Layer Wrap-Up Rodrigo Fonseca

Code No: RR Set No. 1

COMPUTER NETWORKS UNIT I. 1. What are the three criteria necessary for an effective and efficient networks?

CS422 Computer Networks

Introduction to Computer Networks. IEEE Ethernet

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

Department of Electrical Engineering and Computer Science MASSACHUSETTS INSTITUTE OF TECHNOLOGY Spring Quiz III

Communication (III) Kai Huang

LAN PROTOCOLS. Beulah A AP/CSE

CS 457 Networking and the Internet. Link Layer Protocols. Problems 8/31/16. Fall 2016 Indrajit Ray

TCP/IP Performance ITL

Protocols for Multiaccess Networks

6.033 Computer System Engineering

The Link Layer and LANs. Chapter 6: Link layer and LANs

11/24/2009. Fundamentals of Computer Networks ECE 478/578. Flow Control in TCP

Direct Link Communication II: Wired Media. Multi-Access Communication

CS244a: An Introduction to Computer Networks

DLL: Flow Control DLL. Simplex. Fast sender / slow receiver scenario. Various protocols used. Simplified examples implemented in C.

Transcription:

Computer Network (2012 Spring) Homework Answer Chapter2 Question 6 Suppose the following sequence of bits arrives over a link: 1101011111010111110010111110110 Show the resulting frame after any stuffed bits have been removed. Indicate any errors that might have been introduced into the frame. The frame Flag of HDLC or PPP protocol is 01111110. Bit stuffing is used to identify the start or the end of a frame by inserting additional 0. If there are five consecutive 1, the sender will insert one 0 as stuffed bit. If the receiver gets seven consecutive 1, there must be an error of the end of frame (EOF). We indicate the 0 after five 1s with red color. Received sequence: 1101011111010111110010111110110 Removing stuffed 0: 1101011111^1011111^01011111^110 There is no seven consecutive 1 not interrupted by stuffed 0, so the receiver does not detect any error. Question 18 Suppose we want to transmit the message 11001001 and protect it from errors using the CRC polynomial x 3 + 1. (a) Use polynomial long division to determine the message that should be transmitted. (b) Suppose the leftmost bit of the message is inverted due to noise on the transmission link. What is the result of the receiver s CRC calculation? How does the receiver know that an error has occurred? (a) The original message is M=11001001 The CRC polynomial is C(x)=x 3 +1, which is in order of 3, C=1001 Then we append 000 to M, and get T=11001001000, Divide T by C, 1 / 6

Dept. of Electronics and Information Eng., Huazhong University of Science and Technology The quotient is 11010011, the remainder is R=011 What hat we transmit is the M with R appended, i.e., 11001001011 (b) The received message is T =01001001011 =01001001011 The CRC polynomial C=1001 Then we divide T by C, The quotient is 01000001, the remainder is 010 010. Since the T is not exactly divisible by C, i.e, the remainder is not zero, from this CRC calculation result, the receiver can know there must be some error in the received message. Question 24 Suppose you are designing a sliding window protocol for a 1-Mbps point-to-point link to the moon, which has a one-way way latency of 1.25 seconds. Assuming that each frame carries 1 KB of data, what is the minimum number of bits you need for the sequence number? The he bandwidth x delay product is 1Mbps * ( 2 * 1.25 sec) = 2.5Mb = 312500 Byte This equals to 312500B / 1024 (B/pkt) = 305.2 pkt The he sliding window should be larger than 305 packets, and the resulting sequence number 2/6

range should be twice, i.e., 610 packets. Since 2 9 < 610 < 2 10, then at least 10 bits are required to indicate the sequence number. Question 29 Give some details of how you might augment the sliding window protocol with flow control by having ACKs carry additional information that reduces the SWS as the receiver runs out of buffer space. Illustrate your protocol with a timeline for a transmission; assume the initial SWS and RWS are 4, the link speed is instantaneous, and the receiver can free buffers at the rate of one per second (i.e., the receiver is the bottleneck). Show what happens at T = 0, T = 1,..., T = 4 seconds. We assume ACKs carry an additional variable k, which indicate the available buffer space of the receiver. After receiving k, the sender can use it as the maximum sending SWSS (sliding window size). If k = 0, the sender will stop. In this case, the sending rate in the sender side is controlled by the available buffer size in the receiver side, realizing the function of flow control. T=0, Sender sends Frame1-Frame4. In short order, ACK1...ACK4 are received. Sender set SWS to 3, 2, 1, and 0 respectively. T=1, Receiver frees first buffer; sends ACK4/k=1. Sender slides window forward and sendss Frame5. Receiver sends ACK5/k=0. T=2, Receiver frees second buffer; sends ACK5/k=1. Sender sends Frame6; receiver sends ACK6/k=0. 3 / 6

T=3, Receiver frees third buffer; sends ACK6/k=1. Sender sends Frame7; receiver sends ACK7/k=0. T=4, Receiver frees fouth buffer; sends ACK7/k=1. Sender sends Frame8; receiver sends ACK8/k=0. Question 35 Suppose that we run the sliding window algorithm with SWS = 5 and RWS = 3, and no out-of-order arrivals. (a) Find the smallest value for MaxSeqNum. You may assume that it suffices to find the smallest MaxSeqNum such that if DATA[MaxSeqNum] is in the receive window, then DATA[0] can no longer arrive. (b) Give an example showing that MaxSeqNum 1 is not sufficient. (c) State a general rule for the minimum MaxSeqNum in terms of SWS and RWS. (a) The smallest value for MaxSeqNum is 8. Proof: We assume DATA[8] is in the receive window, since RWS = 3, then the earliest possible receive window is { DATA[6], DATA[7], DATA[8] }. ௨旐 Then ACK[6] has been sent by the receiver. ௨旐 Then ACK[6] has been received by the sender. ௨旐 Then DATA[5] has been sent by the receiver. ௨旐 Since SWS = 5, then the earliest possible send window is {DATA[1],DATA[2],,DATA[5]} ௨旐 Since no-out-of-order arrival, DATA[0] can no longer arrive. (b) MaxSeqNum 1 = 7 is not sufficient Proof: 1. We assume the sender sends { DATA[0], DATA[1],, DATA[4] }. All arrive. 2. The receiver sends ACK[5] in response, and the receive window moves on to { DATA[5],, DATA[7]}. 3. We assume the ACK[5] is lost, then sender times out and re-transmits DATA[0]. While the receiver is expecting DATA[7]. 7 and 0 are in-distinguishable in mod MaxSeqNum calculation. So the receiver will accept DATA[0] as DATA[7], which is error. (c) MaxSeqNum SWS + RWS Question 41 The 1982 Ethernet specification allowed between any two stations up to 1500 m of coaxial cable, 4 / 6

1000 m of other point-to-point link cable, and two repeaters. Each station or repeater connects to the coaxial cable via up to 50 m of drop cable. Typical delays associated with each device are given in Table 2.7 (where c = speed of light in a vacuum = 3 10 8 m/s). What is the worst-case round-trip propagation delay, measured in bits, due to the sources listed? (This list is not complete; other sources of delay include sense time and signal rise time.) The one way delays include: 1) propagation delay in coax cable, 1500 / (0.77*3*10 8 ) = 6.49 µs 2) propagation delay in point-to-poin link, 1000 / (0.65*3*10 8 ) = 5.13 µs 3) propagation delay in drop cables, 6 * 50 / (0.65*3*10 8 ) = 1.54 µs 4) process delay in transceivers, 6 * 0.2 = 1.2 µs 5) process delay in repeaters, 2 * 0.6 = 1.2 µs So, the one-way delay is 6.49+5.13+1.54+1.2+1.2 = 15.56µs, the round-trip-time is 31.12µ µs. For 10Mbps Ethernet, one bit time is 0.1µs, then the worst-case round-trip propagation delay is 311 bits. Question 43 Suppose the round-trip propagation delay for Ethernet is 46.4 µs. This yields a minimumm packet size of 512 bits (464 bits corresponding to propagation delay + 48 bits of jam signal). (a) What happens to the minimumm packet size if the delay time is held constant, and the signalling rate rises to 100 Mbps? (b) What are the drawbacks to so large a minimum packet size? (c) If compatibility were not an issue, how might the specifications be written so as to permit a smaller minimum packet size? (a) When rate rises to 100Mbps, one bit time is 0.01µs. If the delay time is held constant, then it will be 4640 bits time. Then the minimum packet size is 4640 + 48 = 4688 bits = 586 Bytes (b) This packet size is considerably larger than many higher-level packet sizes, resulting in considerable wasted bandwidth 5 / 6

(c) The minimum packet size could be smaller if maximum collision domain diameter were reduced, and if sundry other tolerances were tightened up Question44 Let A and B be two stations attempting to transmit on an Ethernet. Each has a steady queue of frames ready to send; A s frames will be numbered A1, A2, and so on, and B s similarly. Let T = 51.2 µs be the exponential backoff base unit. Suppose A and B simultaneously attempt to send frame 1, collide, and happen to choose backoff times of 0 T and 1 T, respectively, meaning A wins the race and transmits A1 while B waits. At the end of this transmission, B will attempt to retransmit B1 while A will attempt to transmit A2. These first attempts will collide, but now A backs off for either 0 T or 1 T, while B backs off for time equal to one of 0 T,..., 3 T. (a) Give the probability that A wins this second backoff race immediately after this first collision; that is, A s first choice of backoff time k 51.2 is less than B s. (b) Suppose A wins this second backoff race. A transmits A3, and when it is finished, A and B collide again as A tries to transmit A4 and B tries once more to transmit B1. Give the probability that A wins this third backoff race immediately after the first collision. (c) Give a reasonable lower bound for the probability that A wins all the remaining backoff races. (d) What then happens to the frame B1? This scenario is known as the Ethernet capture effect. We note the backoff time for A and B are k_a and k_b respectively. (a) After the first collision, k_a can be 0 or 1, k_b can be 0,1,2,3. If A choose a smaller k_a than k_b, then it will win the second backoff race. There will be totally 2*4 cases, and 5 cases satisfying k_a < k_b. As the result, the probability for A wins the second race is 5/8 (b) k_a can be any one in {0,1}, k_b can be {0,1,2,,7}. There will be totally 2*8 cases, and 13 cases satisfying k_a < k_b. As the result, the probability for A wins the second race is 13/16 (c) P(winning race 1) = 5/8 > 1/2 P(winning race 2) = 13/16 > 3/4 P(winning race i) > 1 1/2 i-1 then, P(A wins every time after 3 times) = (1-1/8)*(1-1/16)*(1-1/32)* 3/4 (d) B gives up on B1, and starts over with B2. 6 / 6