EEC-484/584 Computer Networks Lecture 13 Wenbing Zhao

Slides:



Advertisements
Similar presentations
Introduction to Information Technologies
Advertisements

Lecture 15 Link Layer Protocols. Lecture 15-2 Link Layer Services r Framing and link access: encapsulate datagram into frame adding header and trailer,
EECC694 - Shaaban #1 lec #5 Spring Data Link In Broadcast Networks: The Media Access Sublayer Broadcast networks with multi-access (or random.
Fundamentals of Computer Networks ECE 478/578
Multiple access What if multiple machines are sharing the same link?
EEC-484/584 Computer Networks
EEC-484/584 Computer Networks Lecture 7 Wenbing Zhao
Fundamentals of Computer Networks ECE 478/578 Lecture #4: Error Detection and Correction Instructor: Loukas Lazos Dept of Electrical and Computer Engineering.
EEC-484/584 Computer Networks Lecture 6 Wenbing Zhao
MAC Protocols Media Access Control (who gets the use the channel) zContention-based yALOHA and Slotted ALOHA. yCSMA. yCSMA/CD. TDM and FDM are inefficient.
EEC-484/584 Computer Networks Lecture 12 Wenbing Zhao Cleveland State University
PART III DATA LINK LAYER. Position of the Data-Link Layer.
EEC-484/584 Computer Networks Lecture 8 Wenbing Zhao (Part of the slides are based on materials supplied by Dr. Louise Moser at UCSB and.
CS 5253 Workshop 1 MAC Protocol and Traffic Model.
The OSI Reference Model
EEC-484/584 Computer Networks
EEC-484/584 Computer Networks Lecture 9 Wenbing Zhao (Part of the slides are based on materials supplied by Dr. Louise Moser at UCSB and.
CSC 450/550 Part 3: The Medium Access Control Sublayer.
EEC-484/584 Computer Networks Lecture 7 Wenbing Zhao
McGraw-Hill©The McGraw-Hill Companies, Inc., 2004 Chapter 13 Multiple Access.
EEC-484/584 Computer Networks Lecture 8 Wenbing Zhao
CMPE 150- Introduction to Computer Networks 1 CMPE 150 Fall 2005 Lecture 16 Introduction to Computer Networks.
EEC-484/584 Computer Networks Lecture 13 Wenbing Zhao
EEC-484/584 Computer Networks Lecture 9 Wenbing Zhao (Part of the slides are based on materials supplied by Dr. Louise Moser at UCSB and.
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.
CS352- Link Layer Dept. of Computer Science Rutgers University.
Adapted from Tanenbaum's Slides for Computer Networking, 4e The Data Link Layer Chapter 3.
EEC-484/584 Computer Networks Lecture 7 Wenbing Zhao (Part of the slides are based on Drs. Kurose & Ross ’ s slides for their Computer.
Error Detection and Reliable Transmission EECS 122: Lecture 24 Department of Electrical Engineering and Computer Sciences University of California Berkeley.
EEC-484/584 Computer Networks Lecture 7 Wenbing Zhao
Semester EEE449 Computer Networks The Data Link Layer Part 2: Media Access Control En. Mohd Nazri Mahmud MPhil (Cambridge, UK) BEng (Essex,
1 Chapter 5 The Medium Access Sublayer. 2 Chapter 5 The Medium Access Layer 5.1 The Channel Allocation problem - Static and dynamic channel allocation.
Medium Access Control Sublayer
1/26 Chapter 6 Digital Data Communication Techniques.
Data Link Layer IS250 Spring 2010
1 ECE453 – Introduction to Computer Networks Lecture 7 – Multiple Access Control (I)
CIS 725 Media Access Layer. Medium Access Control Sublayer MAC sublayer resides between physical and data link layer Broadcast/multiacess channels N independent.
Chi-Cheng Lin, Winona State University CS412 Introduction to Computer Networking & Telecommunication Medium Access Control Sublayer.
NUS.SOC.CS2105 Ooi Wei Tsang Application Transport Network Link Physical you are here.
LECTURE9 NET301. DYNAMIC MAC PROTOCOL: CONTENTION PROTOCOL Carrier Sense Multiple Access (CSMA): A protocol in which a node verifies the absence of other.
Network Layer4-1 Lower limit on the number of check bits r We want to design a code m with m message bits and r check bits Allowing all single errors to.
PART III DATA LINK LAYER. Position of the Data-Link Layer.
Part 2: Packet Transmission Packets, frames Local area networks (LANs) Wide area networks (LANs) Hardware addresses Bridges and switches Routing and protocols.
Chi-Cheng Lin, Winona State University CS 313 Introduction to Computer Networking & Telecommunication Medium Access Control Sublayer.
ICOM 6115©Manuel Rodriguez-Martinez ICOM 6115 – Computer Networks and the WWW Manuel Rodriguez-Martinez, Ph.D. Lecture 14.
Data Link Layer. Data Link Layer Design Issues Services Provided to the Network Layer Framing Error Control Flow Control.
ECE453 – Introduction to Computer Networks Lecture 4 – Data Link Layer (I)
جلسه یازدهم شبکه های کامپیوتری به نــــــــــــام خدا.
Medium Access Control Sub Layer
Data Communications, Kwangwoon University12-1 Chapter 12. Multiple Access 1.Random Access 2.Controlled Access 3.Channelization.
5: DataLink Layer 5a-1 Multiple Access protocol. 5: DataLink Layer 5a-2 Multiple Access Links and Protocols Three types of “links”: r point-to-point (single.
Computer Communication & Networks Lecture 9 Datalink Layer: Error Detection Waleed Ejaz
1 © Unitec New Zealand CRC calculation and Hammings code.
LECTURE9 NET301 11/5/2015Lect 9 NET DYNAMIC MAC PROTOCOL: CONTENTION PROTOCOL Carrier Sense Multiple Access (CSMA): A protocol in which a node verifies.
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 4 The Medum Access Sublayer. MA Sublayer Additional Reference –Local and Metropolitan Area Networks, William Stallings, Prentice Hall, 2000, 6th.
THE MEDIUM ACCESS CONTROL SUBLAYER 4.1 THE CHANNEL ALLOCATION PROBLEM 4.2 MULTIPLE ACCESS PROTOCOLS.
COMPUTER NETWORKS Data-link Layer (The Medium Access Control Sublayer) MAC Sublayer.
Week3 The Medium Access Sublayer
Dr. Clincy Professor of CS
Physical Link Layer.
Module 3 Medium Access Control.
Multiple Access Mahesh Jangid Assistant Professor JVW University.
Net301 lecture9 11/5/2015 Lect 9 NET301.
Services of DLL Framing Link access Reliable delivery
THE IEEE MAC SUB-LAYER – chapter 14
EEC-484/584 Computer Networks
The Medium Access Control Sublayer
EEC-484/584 Computer Networks
Dr. John P. Abraham Professor UTPA
Presentation transcript:

EEC-484/584 Computer Networks Lecture 13 Wenbing Zhao

2 Spring Semester 2009EEC-484/584: Computer NetworksWenbing Zhao Outline CRC Exercises for Framing and Error Detection Medium Access Control

3 Spring Semester 2009EEC-484/584: Computer NetworksWenbing Zhao Error-Detecting Codes: CRC Polynomial code, also known as CRC (Cyclic Redundant Code) Treat bit string as polynomial with 0 and 1 coefficients m-bit frame: M(x) = b m-1 x m-1 + … + b 0 E.g.: => M(x) = x 7 + x 6 + x 4 + x 3 + x 1 Use modulo 2 arithmetic –No carries or borrows: XOR The degree of a polynomial is the maximum of the degrees of all terms in the polynomial

4 Spring Semester 2009EEC-484/584: Computer NetworksWenbing Zhao Cyclic Redundant Code Sender and receiver agree on generator polynomial G(x) (High & low order bits must be 1) For a frame with m bits corresponding to M(x), m > deg G(x) = r Append checksum to end of frame so polynomial T(x) corresponding to checksummed frame is divisible by G(x) When receiver gets checksummed frame, divides T(x) by G(x) If remainder R(x) != 0, then transmission error

5 Spring Semester 2009EEC-484/584: Computer NetworksWenbing Zhao Algorithm to Compute CRC Checksum Let m = deg M(x), r = deg G(x) Append r 0 bits to lower-order end of frame: x r M(x) Divide bit string corresponding to x r M(x) by bit string corresponding to G(x) Subtract remainder R(x) from bit string corresponding to x r M(x), result is checksummed frame. Let T(x) be its polynomial –x r M(x) = Q(x)G(x) + R(x) –x r M(x) – R(x) = Q(x)G(x) = T(x)

6 Spring Semester 2009EEC-484/584: Computer NetworksWenbing Zhao Compute CRC Checksum XOR

7 Spring Semester 2009EEC-484/584: Computer NetworksWenbing Zhao International Standard Polynomials CRC-12 G(x) = x 12 + x 11 + x 3 + x 2 + x –Used for 6-bit characters CRC-16 G(x) = x 16 + x 15 + x CRC-CCITTG(x) = x 16 + x 12 + x –Used for 8-bit characters CRC-32G(x) = x 32 + x 26 + x 23 + x 22 + x 16 + x 11 + x 10 + x 8 + x 7 + x 5 + x 4 + x 2 + x –Used in IEEE 802 –Detects all bursts of length 32 or less and all bursts affecting an odd number of bits

8 Spring Semester 2009EEC-484/584: Computer NetworksWenbing Zhao Exercise Q1. The following character encoding is used in a data link protocol: A: ; B: ; FLAG: ; ESC: Show the bit sequence transmitted (in binary) for the four- character frame: A B ESC FLAG when each of the following framing methods are used: (a) Character count. (b) Flag bytes with byte stuffing. (c) Starting and ending flag bytes, with bit stuffing

9 Spring Semester 2009EEC-484/584: Computer NetworksWenbing Zhao Exercise Q4. One of your classmates, Scrooge, has pointed out that it is wasteful to end each frame with a flag byte and then begin the next one with a second flag byte. One flag byte could do the job as well, and a byte saved is a byte earned. Do you agree?

10 Spring Semester 2009EEC-484/584: Computer NetworksWenbing Zhao Exercise Q5. To provide more reliability than a single parity bit can give, an error-detecting coding scheme uses one parity bit for checking all the odd-numbered bits and a second parity bit for all the even-numbered bits. What is the Hamming distance of this code?

11 Spring Semester 2009EEC-484/584: Computer NetworksWenbing Zhao Exercise Q6. A bit stream is transmitted using the standard CRC method described in the text. The generator polynomial is x 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.

12 Spring Semester 2009EEC-484/584: Computer NetworksWenbing Zhao Exercises 1.What is the hamming distance of the following code? , , , Given a code with hamming distance of 5, how many single-bit errors can it detect? 3.Given a code with hamming distance of 4, how many single-bit errors can it correct?

13 Spring Semester 2009EEC-484/584: Computer NetworksWenbing Zhao Medium Access Control Sublayer Broadcast channels often used on DLL –Broadcast channels often referred to as multiaccess or random access channels The channel allocation problem: Who gets to use the channel? –Static Channel Allocation –Dynamic Channel Allocation

14 Spring Semester 2009EEC-484/584: Computer NetworksWenbing Zhao Static Channel Allocation FDM – Frequency Division Multiplexing –Frequency spectrum divided into logical channel –Each user has exclusive use of own frequency band TDM – Time Division Multiplexing –Time divided into slots each user has time slot –Users take turns in round robin fashion Problem: wasted bandwidth if user does not use his/her frequency band or timeslot

15 Spring Semester 2009EEC-484/584: Computer NetworksWenbing Zhao Frequency Division Multiplexing

16 Spring Semester 2009EEC-484/584: Computer NetworksWenbing Zhao Time Division Multiplexing T1 Carrier (1.544 Mbps)

17 Spring Semester 2009EEC-484/584: Computer NetworksWenbing Zhao Model for Dynamic Channel Allocation N independent stations (also called terminals) Once a frame has been generated, the station is blocked until the frame is transmitted successfully Single Channel shared by all stations Collision – event when two frames transmitted simultaneously and the resulting signal is garbled –All stations can detect collisions

18 Spring Semester 2009EEC-484/584: Computer NetworksWenbing Zhao Model for Dynamic Channel Allocation Frame transmission time –Continuous Time – can begin at any instant –Slotted Time – always begin at the start of a slot Carrier sense or not –Carrier sense – stations can tell if the channel is busy. Do not send if channel is busy –No carrier sense – just go ahead and send

19 Spring Semester 2009EEC-484/584: Computer NetworksWenbing Zhao Multiple Access Protocols ALOHA Carrier Sense Multiple Access Protocols

20 Spring Semester 2009EEC-484/584: Computer NetworksWenbing Zhao Pure ALOHA Let users transmit whenever they have data to send If frame destroyed (due to collision), sender waits random amount of time, sends again User does not listen before transmitting

21 Spring Semester 2009EEC-484/584: Computer NetworksWenbing Zhao Pure ALOHA: Vulnerable Period Vulnerable period for a frame: A collision will happen if another frame is sent during this period 2 frame time

22 Spring Semester 2009EEC-484/584: Computer NetworksWenbing Zhao Slotted ALOHA Idea: divide time into intervals, each interval corresponds to one frame –Station is permitted to send only at the beginning of next slot Vulnerable period is halved (1 frame time) –Probability of no collision in time slot = e -G –Throughput S = G e -G –Max occurs when G = 1, S = 2*0.184

23 Spring Semester 2009EEC-484/584: Computer NetworksWenbing Zhao Throughput for ALOHA Systems

24 Spring Semester 2009EEC-484/584: Computer NetworksWenbing Zhao Carrier Sense Multiple Access When station has data to send, listens to channel to see if anyone else is transmitting If channel is idle, station transmits a frame –Else station waits for it to become idle If collisions occurs, station waits random amount of time, tries again Also called 1-persistent CSMA –With probability 1 station will transmit if channel is idle

25 Spring Semester 2009EEC-484/584: Computer NetworksWenbing Zhao After a station starts sending, it takes a while before 2nd station receives 1st station ’ s signal –2nd station might start sending before it knows that another station has already been transmitting If two stations become ready while third station transmitting –Both wait until transmission ends and start transmitting, collision results Carrier Sense Multiple Access: Collision Still Possible

26 Spring Semester 2009EEC-484/584: Computer NetworksWenbing Zhao p-persistent CSMA: Reduce the Probability of Collision Sense continuously, but does not always send when channel is idle –Applicable for slotted channels When ready to send, station senses the channel –If channel idle, station transmits with probability p, defers to next slot with probability q = 1-p –Else (if channel is busy) station waits until next slot tries again –If next slot idle, station transmits with probability p, defers with probability q = 1-p –…–…

27 Spring Semester 2009EEC-484/584: Computer NetworksWenbing Zhao Non-Persistent CSMA Does not sense continuously, send if it senses the channel is idle Before sending, station senses the channel –If channel is idle, station begins sending –Else station does not continuously sense, waits random amount of time, tries again

28 Spring Semester 2009EEC-484/584: Computer NetworksWenbing Zhao Persistent and Nonpersistent CSMA Improves over ALOHA because they ensure no station to transmit when it senses channel is busy

29 Spring Semester 2009EEC-484/584: Computer NetworksWenbing Zhao CSMA with Collision Detection If two stations start transmitting simultaneously, both detect collision and stop transmitting Minimum time to detect collision?

30 Spring Semester 2009EEC-484/584: Computer NetworksWenbing Zhao Minimum Time to Detect Collision To ensure the sender can detect collision –All frames must take more than 2  to send so that transmission is still taking place when the noise burst gets back to the sender

31 Spring Semester 2009EEC-484/584: Computer NetworksWenbing Zhao CRC and Hamming Distance CRC-32G(x) = x 32 + x 26 + x 23 + x 22 + x 16 + x 11 + x 10 + x 8 + x 7 + x 5 + x 4 + x 2 + x –Used in IEEE 802 –Detects all bursts of length 32 or less and all bursts affecting an odd number of bits –It has a hamming distance of 4 (for large frames) allowing detection of up to 3 error bits anywhere in a frame (from