EEC-484/584 Computer Networks Lecture 13 Wenbing Zhao

Slides:



Advertisements
Similar presentations
Channel Allocation Protocols. Dynamic Channel Allocation Parameters Station Model. –N independent stations, each acting as a Poisson Process for the purpose.
Advertisements

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.
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?
Lecture 9: Multiple Access Protocols
The Data Link Layer introduction point-to-point data link protocols
1 K. Salah Module 4.2: Media Access Control The Media Access Control (MAC) sublayer –Random Access (CSMA), IEEE –Token Passing, IEEE Ch 13-
5: DataLink Layer5a-1 MAC Sublayer. 5: DataLink Layer5a-2 Multiple Access Links and Protocols Two types of “links”: r point-to-point m PPP for dial-up.
1 Pertemuan 13 Teknik Akses Jaringan - Random Matakuliah: H0174/Jaringan Komputer Tahun: 2006 Versi: 1/0.
EEC-484/584 Computer Networks Lecture 7 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.
CS 5253 Workshop 1 MAC Protocol and Traffic Model.
5: DataLink Layer5-1 Data Link Layer r What is Data Link Layer? r Multiple access protocols r Ethernet.
EEC-484/584 Computer Networks Lecture 10 Wenbing Zhao (Part of the slides are based on materials supplied by Dr. Louise Moser at UCSB.
CMPE 150- Introduction to Computer Networks 1 CMPE 150 Fall 2005 Lecture 17 Introduction to Computer Networks.
EEC-484/584 Computer Networks Lecture 8 Wenbing Zhao
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.
CSC 450/550 Part 3: The Medium Access Control Sublayer.
EEC-484/584 Computer Networks Lecture 7 Wenbing Zhao
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 9 Wenbing Zhao (Part of the slides are based on materials supplied by Dr. Louise Moser at UCSB and.
5-1 Data Link Layer r Today, we will study the data link layer… r This is the last layer in the network protocol stack we will study in this class…
EEC-484/584 Computer Networks Lecture 14 Wenbing Zhao
EEC-484/584 Computer Networks Lecture 13 Wenbing Zhao
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
EEC-484/584 Computer Networks Lecture 13 Wenbing Zhao
5: DataLink Layer5-1 LAN technologies Data link layer so far: m services, error detection/correction, multiple access Next: LAN technologies m addressing.
ICOM 6115©Manuel Rodriguez-Martinez ICOM 6115 – Computer Networks and the WWW Manuel Rodriguez-Martinez, Ph.D. Lecture 17.
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.
Introduction1-1 Data Communications and Computer Networks Chapter 5 CS 3830 Lecture 27 Omar Meqdadi Department of Computer Science and Software Engineering.
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.
ICOM 6115©Manuel Rodriguez-Martinez ICOM 6115 – Computer Networks and the WWW Manuel Rodriguez-Martinez, Ph.D. Lecture 16.
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.
Chi-Cheng Lin, Winona State University CS 313 Introduction to Computer Networking & Telecommunication Medium Access Control Sublayer.
جلسه یازدهم شبکه های کامپیوتری به نــــــــــــام خدا.
17 - Winter 2005 ECE ECE 766 Computer Interfacing and Protocols 1 Local Area Networks Need for high performance communications for physically close devices.
Medium Access Control Sub Layer
Data Communications, Kwangwoon University12-1 Chapter 12. Multiple Access 1.Random Access 2.Controlled Access 3.Channelization.
EEC-484 Computer Networks Lecture 13 Wenbing Zhao 12/6/20151.
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.
EEC-484/584 Computer Networks Lecture 13 Wenbing Zhao
LECTURE9 NET301 11/5/2015Lect 9 NET DYNAMIC MAC PROTOCOL: CONTENTION PROTOCOL Carrier Sense Multiple Access (CSMA): A protocol in which a node verifies.
EE 122: Lecture 6 Ion Stoica September 13, 2001 (* this talk is based in part on the on-line slides of J. Kurose & K. Rose)
1 Ethernet “dominant” LAN technology: cheap $20 for 100Mbs! first widely used LAN technology Simpler, cheaper than token LANs and ATM Kept up with speed.
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.
Multiple Access By, B. R. Chandavarkar, CSE Dept., NITK, Surathkal Ref: B. A. Forouzan, 5 th Edition.
Link Layer 5.1 Introduction and services
Week3 The Medium Access Sublayer
EEC-484/584 Computer Networks
Lab 7 – CSMA/CD (Data Link Layer Layer)
Module 3 Medium Access Control.
CS 457 – Lecture 6 Ethernet Spring 2012.
Data Link Issues Relates to Lab 2.
Services of DLL Framing Link access Reliable delivery
THE IEEE MAC SUB-LAYER – chapter 14
Data Communication Networks
Link Layer: Multiple Access
Dr. John P. Abraham Professor UTPA
Multiple Access Control (MAC) Protocols
Presentation transcript:

EEC-484/584 Computer Networks Lecture 13 Wenbing Zhao

2 6/27/2015EEC-484/584: Computer NetworksWenbing Zhao Outline Medium Access Control Ethernet –Manchester Encoding –The Ethernet MAC Sublayer Protocol –The Binary Exponential Backoff Algorithm

3 6/27/2015EEC-484/584: Computer NetworksWenbing Zhao Medium Access Control Sublayer Broadcast channels often used on data link layer –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

4 6/27/2015EEC-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

5 6/27/2015EEC-484/584: Computer NetworksWenbing Zhao Frequency Division Multiplexing

6 6/27/2015EEC-484/584: Computer NetworksWenbing Zhao Time Division Multiplexing T1 Carrier (1.544 Mbps)

7 6/27/2015EEC-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

8 6/27/2015EEC-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

9 6/27/2015EEC-484/584: Computer NetworksWenbing Zhao Multiple Access Protocols ALOHA Carrier Sense Multiple Access Protocols

10 6/27/2015EEC-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

11 6/27/2015EEC-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

12 6/27/2015EEC-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 (G: # of attempts per frame time)

13 6/27/2015EEC-484/584: Computer NetworksWenbing Zhao Throughput for ALOHA Systems

14 6/27/2015EEC-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

15 6/27/2015EEC-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

16 6/27/2015EEC-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 –…–…

17 6/27/2015EEC-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

18 6/27/2015EEC-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

19 6/27/2015EEC-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?

20 6/27/2015EEC-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

21 6/27/2015EEC-484/584: Computer NetworksWenbing Zhao Manchester Encoding Binary encoding –Hard to distinguish 0 bit (0-volt) from idle (0-volt) –Requires clocks of all stations synchronized Manchester encoding and differential Manchester encoding

22 6/27/2015EEC-484/584: Computer NetworksWenbing Zhao Ethernet Frame Structure Preamble: for clock synchronization –First 7 bytes with pattern , last byte with pattern –The two consecutive 1 ’ s indicate the start of a frame How can the receiver tell the end of the frame? –No current on the wire ( interesting discussion at >= 64 bytes Not considered as part of the header!

23 6/27/2015EEC-484/584: Computer NetworksWenbing Zhao Ethernet Frame Structure Destination address: 6 bytes (48 bits) –Highest order bit: 0 individual, 1 multicast; all 1 ’ s broadcast –Frames received with non-matching destination address is discarded Type/Length: type of network layer protocol (or length of payload) Pad – used to produce valid frame >= 64 bytes Checksum – 32-bit cyclic redundancy check

24 6/27/2015EEC-484/584: Computer NetworksWenbing Zhao CSMA with Collision Detection If two stations start transmitting simultaneously, both detect collision and stop transmitting Monitor collision while sending –Minimum time to detect collision => minimum frame length Time divided into slots –Length of slot = 2  = worst-case round-trip propagation time –To accommodate longest path, slot time = 512 bit times = 51.2  sec (10Mbps Ethernet) => min frame length: 51.2  sec X 10 Mbps = 512 b = 64 byte

25 EEC-484/584: Computer Networks5-25 Ethernet MAC Sublayer Protocol Connectionless: No handshaking between sending and receiving NICs –Ethernet resides in the Network Interface Card (NIC) Unreliable: receiving NIC doesn’t send acks or nacks to sending NIC –stream of datagrams passed to network layer can have gaps (missing datagrams) –gaps will be filled if app is using TCP –otherwise, app will see gaps Ethernet’s MAC protocol: CSMA/CD 6/27/2015

26 EEC-484/584: Computer Networks5-26 Ethernet CSMA/CD algorithm 1. NIC receives datagram from network layer, creates frame 2. If NIC senses channel idle, starts frame transmission If NIC senses channel busy, waits until channel idle, then transmits 3. If NIC transmits entire frame without detecting another transmission, NIC is done with frame ! 4. If NIC detects another transmission while transmitting, aborts and sends jam signal 5. After aborting, NIC enters exponential backoff: after mth collision, NIC chooses K at random from {0,1,2,…,2 m -1}. NIC waits K·512 bit times, returns to Step 2 6/27/2015

27 EEC-484/584: Computer NetworksWenbing Zhao Randomization and Binary Exponential Backoff After 1 st collision, station picks 0 or 1 at random, waits that number of slots and tries again After 2 nd collision, station picks 0,1,2,3 at random, waits that number of slots and tries again …. After i-th collision, station picks 0,1, …,2 i -1 at random, … If 10 <= i < 16, station picks 0,1, …, at random If i=16, controller reports failure to computer Why randomization is needed?

28 6/27/2015EEC-484/584: Computer NetworksWenbing Zhao Ethernet Performance Binary exponential backoff results in –Low delay when few stations collide –Reasonable delay for collision resolution when many stations collide

29 6/27/2015EEC-484/584: Computer NetworksWenbing Zhao Exercise An IP packet to be transmitted by Ethernet is 60 bytes long. Is padding needed in the Ethernet frame, and if so, how many bytes?

30 6/27/2015EEC-484/584: Computer NetworksWenbing Zhao Exercise Consider building a CSMA/CD network running at 1 Gbps over a 1-km cable. The signal speed in the cable is 200,000 km/sec. What is the minimum frame size?