Exercises on Data Link Layer.

Slides:



Advertisements
Similar presentations
ECE358: Computer Networks Fall 2014
Advertisements

EE 4272Spring, 2003 Chapter 7 Data Link Control Objectives: Effective & reliable data communication between two directly connected transmitting-receiving.
The ALOHA Protocol “Free for all”: whenever station has a frame to send, it does so. –Station listens for maximum RTT for an ACK. –If no ACK after a specified.
8-Reliability and Channel Coding Dr. John P. Abraham Professor UTPA.
Chapter 6 Errors, Error Detection, and Error Control.
EEC-484/584 Computer Networks
5-1 Link Layer: Introduction Some terminology: r hosts and routers are nodes r communication channels that connect adjacent nodes along communication path.
1 Version 3.0 Module 6 Ethernet Fundamentals. 2 Version 3.0 Why is Ethernet so Successful? In 1973, it could carry data at 3 Mbps Now, it can carry data.
EEC-484/584 Computer Networks Lecture 7 Wenbing Zhao
EEC-484/584 Computer Networks Lecture 6 Wenbing Zhao
EEC-484/584 Computer Networks Lecture 12 Wenbing Zhao Cleveland State University
1 Chapter Six - Errors, Error Detection, and Error Control Chapter Six.
CMPE 150- Introduction to Computer Networks 1 CMPE 150 Fall 2005 Lecture 12 Introduction to Computer Networks.
The Data Link Layer Chapter 3. Position of the data-link layer.
The OSI Reference Model
1 K. Salah Module 4.0: Data Link Layer The Logical Link Control (LLC) sublayer –Framing –Flow Control –Error Control The Media Access Control (MAC) sublayer.
EEC-484/584 Computer Networks Lecture 13 Wenbing Zhao
Chapter 6: Errors, Error Detection, and Error Control
EEC-484/584 Computer Networks Lecture 7 Wenbing Zhao
EEC-484/584 Computer Networks Lecture 13 Wenbing Zhao
Chapter 6 Errors, Error Detection, and Error Control
EEC-484/584 Computer Networks Lecture 7 Wenbing Zhao (Part of the slides are based on materials supplied by Dr. Louise Moser at UCSB and.
ECE358: Computer Networks Spring 2012
20101 The Data Link Layer Chapter Design Issues Controls communication between 2 machines directly connected by “wire”-like link Services Provided.
EEC-484/584 Computer Networks Lecture 7 Wenbing Zhao
ICOM 6115©Manuel Rodriguez-Martinez ICOM 6115 – Computer Networks and the WWW Manuel Rodriguez-Martinez, Ph.D. Lecture 17.
NUS.SOC.CS2105 Ooi Wei Tsang Application Transport Network Link Physical you are here.
جلسه دهم شبکه های کامپیوتری به نــــــــــــام خدا.
William Stallings Data and Computer Communications 7th Edition
Data and Computer Communications. The Data Link Layer.
Data Link Layer We have now discussed the prevalent shared channel technologies  Ethernet/IEEE  Wireless LANs (802.11) We have now covered chapters.
Exercises. Problem 1 The link delay is 270ms. Each data frame is 1000 bits. Data rate is 1Mbps. What is the link efficiency of the Stop&Wait protocol?
1 Data Link Layer Lecture 20 Imran Ahmed University of Management & Technology.
Chi-Cheng Lin, Winona State University CS 313 Introduction to Computer Networking & Telecommunication Data Link Layer Part I – Designing Issues and Elementary.
ICOM 6115©Manuel Rodriguez-Martinez ICOM 6115 – Computer Networks and the WWW Manuel Rodriguez-Martinez, Ph.D. Lecture 14.
CHAPTER 2 HARDWARE BUILDING BLOCK ENCODING FRAMING ERROR DETECTION.
Data Link Layer Moving Frames. Link Layer Protocols: ethernet, wireless, Token Ring and PPP Has node-to-node job of moving network layer.
Chapter 5 Peer-to-Peer Protocols and Data Link Layer PART I: Peer-to-Peer Protocols ARQ Protocols and Reliable Data Transfer Flow Control.
Data Link Layer : Services, Framing, Error Detection and Correction2.
Cyclic Redundancy Check (CRC).  An error detection mechanism in which a special number is appended to a block of data in order to detect any changes.
1 Message Delineation Identify the start and end of messages by: Identify the start and end of messages by:
1 Chapter Six - Errors, Error Detection, and Error Control Chapter Six.
Data Communications & Computer Networks, Second Edition1 Chapter 6 Errors, Error Detection, and Error Control.
Chapter 6: Errors, Error Detection, and Error Control Data Communications and Computer Networks: A Business User’s Approach Third Edition.
Multiple Access.
Data Link and Flow Control Networks and Protocols Prepared by: TGK First Prepared on: Last Modified on: Quality checked by: Copyright 2009 Asia Pacific.
1 Error Detection and Correction Martin Weiss. Slide 2 Objectives of this Meeting u Describe the major error detection techniques u Describe forward error.
Error Correction and Flow Control Martin Weiss. Slide 2 Objectives of this Meeting u Describe different flow control techniques u Describe the major error.
Data Link Layer Flow and Error Control. Flow Control Flow Control Flow Control Specifies the amount of data can be transmitted by sender before receiving.
Network Layer4-1 Chapter 5: The Data Link Layer Our goals: r understand principles behind data link layer services: m error detection, correction m sharing.
Chapter Objectives After completing this chapter you will be able to: Describe in detail the following Local Area Network (LAN) technologies: Ethernet.
1 The Data Link Layer A. S. Tanenbaum Computer Networks W. Stallings Data and Computer Communications Chapter 3.
Chapter 9: Data Link Control Business Data Communications, 4e.
Chapter 3: The Data Link Layer –to achieve reliable, efficient communication between two physically connected machines. –Design issues: services interface.
Powerpoint Templates Data Communication Muhammad Waseem Iqbal Lec # 15.
Coding and Error Control
Data Link Layer Flow Control.
MEDIUM ACCESS CONTROL PROTOCOL
Data Link Layer.
CIS 321 Data Communications & Networking
Chap. 4 Data link layer 2.
Data Link Layer What does it do?
Services of DLL Framing Link access Reliable delivery
Lecture on Data Link Control
Chapter 3 – Part 1 The Data Link Layer.
Data Link Layer: Data Link Control
Overview Jaringan Komputer (2)
CS412 Introduction to Computer Networking & Telecommunication
EEC-484/584 Computer Networks
Data Link Layer. Position of the data-link layer.
Presentation transcript:

Exercises on Data Link Layer

Exercise 1 110111111011111000011111011000100101011111011011111101010 Start and end of the frame? Remove the stuffing bits 110111111011111000011111011000100101011111011011111101010 11111000011111011000100101011111011 11111000111111100010010101111111

Exercise 2 If the bit string 0111101111101111110 is bit stuffed using the frame delimiter 01111110, what is the output string? Ans: 01111011111001111101001111110

Exercise 3 What is the Hamming code of 0110101? Ans: 10001100101

Exercise 4 Sixteen-bit messages are transmitted using a Hamming code. How many check bits are needed to ensure that the receiver can detect and correct single bit errors? Show the bit pattern transmitted for the message 1101001100110101. Assume that even parity is used in the Hamming code. Parity bits are needed at positions 1, 2, 4, 8, and 16 Messages that do not extend beyond bit 31 (including the parity bits) fit. Thus, five parity bits are sufficient. The bit pattern transmitted is 011010110011001110101

Exercise 5 A 12-bit Hamming code whose hexadecimal value is 0xE4F arrives at a receiver. What was the original value in hexadecimal? Assume that not more than 1 bit is in error. In binary 1110 0100 1111 If we number the bits from left to right starting at bit 1, in this example, bit 2 (a parity bit) is incorrect. The 12-bit value transmitted (after Hamming encoding) was 0xA4F. The original 8-bit data value was 0xAF.

Exercise 6 What is the remainder obtained by dividing x^7 + x^5 + 1 by the generator polynomial x^3 + 1 ? Ans: 111

Exercise 7 A bit stream 10011101 is transmitted using the standard CRC method described in the text. The generator polynomial is x3 + 1. Show the actual bit string transmitted. Suppose the third bit from the left is inverted during transmission. Show that this error is detected at the receiver's end Ans: The frame is 10011101. The generator is 1001. The message after appending three zeros is 10011101000. The remainder on dividing 10011101000 by 1001 is 100. So, the actual bit string transmitted is 10011101100. The received bit stream with an error in the third bit from the left is 10111101100. Dividing this by 1001 produces a remainder 100, which is different from zero. Thus, the receiver detects the error and can ask for a retransmission.

Exercise 8 Can you think of any circumstances under which an open-loop protocol, (e.g., a Hamming code) might be preferable to the feedback-type protocols discussed throughout this chapter? If the propagation delay is very long, as in the case of a space probe on or near Mars or Venus, forward error correction is indicated. It is also appropriate, in a military situation in which the receiver does not want to disclose his location by transmitting. If the error rate is low enough that an errorcorrecting code is good enough, it may also be simpler. Finally, real-time systems cannot tolerate waiting for retransmissions.

Exercise 9 Assume two nodes are connected via a 64 Kbps line with L=100km. A Stop and Wait protocol is active. Minimum time needed to transfer 10 packets, where: Lp = packet length = 80 byte (header negligible) La = ACK length (RN only) = 8 byte (header negligible)

Exercise 9 - Solution Propagation time = t = L/c = 100000/2*10^8 = 0.5 msec Packet trax time = Tp = Lp/v = (80*8)/64*10^3 = 10 msec ACK trax time = Ta = La/v = (8*8)/64*10^3 = 1 msec Ttot = (inizio trax 1^ - fine trax ultimo) = 9(Tp + Ta + 2t) + Tp = 118 msec

Exercise 10 In most networks, the data link layer handles transmission errors by requesting damaged frames to be re-transmitted. If the probability of a frame's being damaged is p, what is the mean number of transmissions required to send a frame if the acknowledgements are never lost? The probability, Pk, of a frame requiring exactly k transmissions is the probablity of the first k-1 attempts failing, p^^(k-1), times the probability of the k-th transmission succeeding, (1-p). The mean number of transmissions is then just: sum from k = 1 to infinity of kPk which reduces to: sum from k = 1 to infinity of k(1-p)p^^(k-1) = 1 / (1 - p)

Exercise 11 Assume two nodes are connected via a 64 Kbps line with L=100km. A Stop and Wait protocol is active, where: Lp = packet length = 80 byte (header negligible) La = ACK length (RN only) = 16 bit (header negligible) propagation time t =1 msec Minimum time needed to transfer 12 packets (waiting for the last ACK)? Average time needed to transfer 12 packets when transmission has p=0.1 packet error probability?

Exercise 11 - Solution Packet trax time = Tp = Lp/v = (80*8)/64*10^3 = 10 msec ACK trax time = Ta = La/v = 16/64*10^3 = 0.25 msec Ttot = N(Tp + Ta + 2t) = 147 msec As for Exe 5, the probability Pi of a frame requiring exactly k transmissions is: Pi = P[n=i] = pi-1(1-p) Then the average number of transmissions is: Ttot = N(Tp + Ta + 2t) E[n] = 163.3 msec

Exercise 12 Assume two nodes are connected via a 6.4 Mbps line with L=100km. A GoBack-n protocol is active, with n=3. Minimum time needed to transfer 13 packets, where: Lp = packet length = 80 byte (header negligible) La = ACK length (RN only) = 8 byte (header negligible)

Exercise 12 - Solution Propagation time = t = L/c = 100000/2*10^8 = 0.5 msec Packet trax time = Tp = Lp/v = (80*8)/6.4*10^6 = 0.1 msec ACK trax time = Ta = La/v = (8*8)/6.4*10^6 = 0.01 msec 4 groups of 3 packets + 1 single packet Ttot = (inizio trax 1^ - fine trax ultimo) = 4(Tp + Ta + 2t) + Tp = 4.54 msec

Exercise 13 Assume a GoBack-n protocol is active, with n=4 and time-out equal to 5 times the frame transmission time. SN = Sending Number, RN = Request Number (it indicates the expected frame number, and NOT the acknowledged SN from the other side) Conclude the following picture: NOTE THAT the notation for RN is different from the textbook: in all the exercises here it is the frame number which is expected by the receiver. It does NOT correspond to the frame number just received from the transmitter!

Exercise 13 - Solution

Exercise 14 Assume a GoBack-n protocol is active, with n=3 and time-out equal to 5 times the frame transmission time. Conclude the following picture:

Exercise 14 - Solution

Exercise 15 Consider a network based on pure ALOHA with poissonian traffic If the success probability is equal to 0.1, calculate: the traffic G throughput S See slide 8-9-10 from “chapter4-mac.ppt” -------------------------- P = e^(-2G) = 0.1 -2G = ln (0.1) a) G = -1/2 ln (0.1) = 1.151 b) S = G e^(-2G) = 0.115

Exercise 16 Consider a network based on slotted-ALOHA, made of three stations with these MAC address: A (21); B (17); C (8) Retransmission rule after a collision: the station retransmit after a number of slots equal to the reminder of the division between its MAC address and 2k, where k is the number of successive collisions experienced by the station itself If the three stations collide in the first slot, when do they manage to transmit correctly their packet? A B C Sol: A B A B C B A 1 2 3 4 5 6 7 8 9 10 11 12 13 14

Exercise 17 As in the previous exercise, but with 4 stations: A (18); B (17); C (20); D (4) If A, B e C transmit a packet during slot 0, while D transmits a packet during slot 2, when do the stations manage to transmit correctly their packet? A B C B C D Sol: A C A B A C D B A C 1 2 3 4 5 6 7 8 9 10 11 12 13 14

Exercise 18 Assume a maximum data field for an Ethernet frame of 1500 bytes. What is the overhead (in %) for a 4096-byte application message? (Hint: consider 56 bytes of upper layers headers) Hint: the message must be segmented into multiple frames and be careful of how you consider the data field in the Ethernet frame. --------------------------------------- The LAN data field includes 56 bytes of IP, TCP, and Appl headers leaving 1444 bytes for Appl data. A 4096 byte message segments into 3 frames with 1444 bytes payload, 1444 bytes payload, and 1208 bytes payload. Thus, we have 3 * (56 + 26) = 3 * (22 + 20 + 20 + 16 + 4) = 246 bytes of overhead to transport 4096 bytes, or 246 / (4096 + 246) = 5.66% overhead.

Exercise 19 Ethernet frames must be at least 64 bytes long to ensure that the transmitter can detect collisions. Fast-Ethernet has the same minimum frame size but can transmit 10 times faster. How is it possible to still detect collisions? In order to detect collisions, the station must be still transmitting when the first bit reaches the far end of the cable. As the network speed goes up, the minimum frame length must go up or the maximum cable length must come down proportionally. Indeed, let: c=speed of signal (2*10^8), l = length of the cable, and s=data rate (bps) Then the minimum frame size is: x=s*l/c. Thus, since x is the same for both Ethernet and Fast Ethernet, and s in Fast Ethernet is 10 times as much as in Ethernet, l, the wire length, must be 1/10 as long as in Ethernet.

Exercise 20 Consider building a CSMA/CD network at 1Gbps over a 1km cable with no repeaters. What is the minimum frame size? (Assume the signal speed in the cable is 200,000 Km/sec). In order to detect collisions, the station must be still transmitting when the first bit reaches the far end of the cable. For a 1Km cable, the one-way propagation time is tau=5usec so 2tau=10usec (RTT). At 1 Gbps all frames shorter than 10,000 bits can be completely transmitted in under 10msec. Thus the minimum frame size is 10,000 bits.