Medium Access Control Sub Layer

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.
Ethernet – CSMA/CD Review
Fundamentals of Computer Networks ECE 478/578
Communication Networks Lecture 5 NETW 501-L5: NETW 501-L5: Medium Access Control Dr.-Ing. Khaled Shawky Hassan Room: C3-222, ext: 1204,
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.
CMPE 150- Introduction to Computer Networks 1 CMPE 150 Fall 2005 Lecture 17 Introduction to Computer Networks.
Copyright © 2003, Dr. Dharma P. Agrawal and Dr. Qing-An Zeng. All rights reserved. 1 Chapter 6 Multiple Radio Access.
EEC-484/584 Computer Networks Lecture 13 Wenbing Zhao
EEC-484/584 Computer Networks Lecture 7 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.
Studying Local Area Networks Via Media Access Control (MAC) SubLayer
CS 5253 Workshop 1 MAC Protocol and Traffic Model.
Networks: Local Area Networks1 LANs Studying Local Area Networks Via Media Access Control (MAC) SubLayer.
Computer Networks: Local Area Networks 1 LANs Studying Local Area Networks via the Media Access Control (MAC) SubLayer.
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,
Computer Networks, Fifth Edition by Andrew Tanenbaum and David Wetherall, © Pearson Education-Prentice Hall, 2011 The Medium Access Control Sublayer Chapter.
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 ECE453 – Introduction to Computer Networks Lecture 7 – Multiple Access Control (I)
Multiple Access Protocols Chapter 6 of Hiroshi Harada Book
CIS 725 Media Access Layer. Medium Access Control Sublayer MAC sublayer resides between physical and data link layer Broadcast/multiacess channels N independent.
1 Computer Communication & Networks Lecture 12 Datalink Layer: Multiple Access Waleed Ejaz
Chi-Cheng Lin, Winona State University CS412 Introduction to Computer Networking & Telecommunication Medium Access Control Sublayer.
Chapter 4: Medium Access Control (MAC) Sublayer
CHAPTER 4: THE MEDIUM ACCESS SUBLAYER 4.1: The Channel Allocation Problem 4.2: Multiple Access Protocols.
LECTURE9 NET301. DYNAMIC MAC PROTOCOL: CONTENTION PROTOCOL Carrier Sense Multiple Access (CSMA): A protocol in which a node verifies the absence of other.
LOCAL AREA NETWORKS. CSMA Carrier Sense Multiple Access To minimize the chance of collision and, therefore, increase the performance, the CSMA method.
جلسه دهم شبکه های کامپیوتری به نــــــــــــام خدا.
Medium Access Control NWEN302 Computer Network Design.
The Medium Access Control Sublayer Chapter 4. The Channel Allocation Problem Static Channel Allocation Dynamic Channel Allocation  Delay for the divided.
Chi-Cheng Lin, Winona State University CS 313 Introduction to Computer Networking & Telecommunication Medium Access Control Sublayer.
جلسه یازدهم شبکه های کامپیوتری به نــــــــــــام خدا.
McGraw-Hill©The McGraw-Hill Companies, Inc., 2000 Unit-II Copyright © The McGraw-Hill Companies, Inc. Permission required for reproduction or display.
4: DataLink Layer1 Multiple Access Links and Protocols Three types of “links”: r point-to-point (single wire, e.g. PPP, SLIP) r broadcast (shared wire.
LOCAL AREA NETWORKS. CSMA/CD Carrier Sense Multiple Access with Collision Detection The CSMA method does not specify the procedure following a collision.
7-1 Introduction to Queueing Theory l Components of a queueing system n probability density function (pdf) of interarrival times n pdf of service times.
Multiple Access.
Chapter 6 Multiple Radio Access
CS3502: Data and Computer Networks Local Area Networks - 1 introduction and early broadcast protocols.
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.
LECTURE9 NET301 11/5/2015Lect 9 NET DYNAMIC MAC PROTOCOL: CONTENTION PROTOCOL Carrier Sense Multiple Access (CSMA): A protocol in which a node verifies.
1 Ethernet CSE 3213 Fall February Introduction Rapid changes in technology designs Broader use of LANs New schemes for high-speed LANs High-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.
UNIT 2 Medium Access sub layer: Medium Access sub layer - Channel Allocations, LAN protocols - ALOHA protocols(PURE AND SLOTTED ALOHA),CSMA/CA,CSMA/CD.
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.
CS 5253 Workshop 1 MAC Protocol and Traffic Model.
Week3 The Medium Access Sublayer
Chapter 12 Multiple Access.
Module 3 Medium Access Control.
Multiple Access Mahesh Jangid Assistant Professor JVW University.
Services of DLL Framing Link access Reliable delivery
THE IEEE MAC SUB-LAYER – chapter 14
Overview Jaringan Komputer (3)
The Medium Access Control Sublayer
Channel Allocation Problem/Multiple Access Protocols Group 3
Link Layer and LANs Not everyone is meant to make a difference. But for me, the choice to lead an ordinary life is no longer an option 5: DataLink Layer.
Channel Allocation Problem/Multiple Access Protocols Group 3
Data Communication Networks
Chapter 6 Multiple Radio Access.
Dr. John P. Abraham Professor UTPA
Presentation transcript:

Medium Access Control Sub Layer

Contents Multiple Access Protocols ALOHA Carrier Sense Multiple Access Protocols Collision-Free Protocols This presentation deals with broadcast networks and their protocols.

The Channel Allocation Problem In broadcast networks the key issue is how to determine how gets to use the channel when there is competition for it Static Channel Allocation in LANs and MANs FDM or TDM allocation Problems when there is a large number of users, since spectrum will be wasted Dynamic Channel Allocation in LANs and MANs A number of assumptions are in place

Dynamic Channel Allocation (1) Station Model. The model consists of N independent stations Single Channel Assumption. A single channel is available for all communications Collision Assumption. If two frames are transmitted simultaneously , they overlap in time and the resulting signal is garbled. This event is called a collision. All station can detect collisions A collided frame must be transmitted again latter There are no errors other than those generated by collisions

Dynamic Channel Allocation (2) (a) Continuous Time Frame transmission can begin at any time There is no master clock dividing the time into discrete intervals (b) Slotted Time Time is divided into discrete intervals called slots. Frame transmission begins at the beginning of the slot A slot may be idle, may have one frame (legal) and may have multiple frames (collision) (a) Carrier Sense Stations can tell if the channel is in use before trying to use it If channel is in use, no station will attempt to use it before goes idle (b) No Carrier Sense Stations can’t sense the channel before trying to use it They go ahead and transmit … only later they can say it was an error

Multiple Access Protocols ALOHA Carrier Sense Multiple Access Protocols Collision-Free Protocols Wireless LAN Protocols

In pure ALOHA, frames are transmitted at completely arbitrary times. Whenever two frames will try to occupy the channel at the same time, there will be a collision, and both will be garbled. ALOHA is using fixed length frames.

Figure 12.3 Frames in a pure ALOHA network

Pure ALOHA (2) Frame time – the amount of time needed to transmit the standard fixed length frame An infinite population of users generates new frames according to a Poisson distribution, with mean N frames per time frame. If N >1 than more frames than the channel can handle 0<N<1 for reasonable throughput

Pure ALOHA (3) In addition to new frames, stations generate retransmissions. The probability of k transmission attempts per frame time, old and new combined, is also Poisson, with mean G per frame G >= N (equal when there are no retransmissions) Throughput of a channel is: S = G P0, where P0 is the probability that a frame doesn’t suffer collisions

Vulnerable period for the shaded frame. Pure ALOHA (3) Vulnerable period for the shaded frame. If we are looking at the when a frame can suffer collisions, we can see that there is a vulnerable period of 2 times the frame time.

Figure 12.5 Vulnerable time for pure ALOHA protocol

Pure ALOHA (4) The probability that k frames are generated during a given frame time is given by Poisson distribution: So the probability of zero frames is just e-G In the vulnerable interval, the mean number of frames generated is 2G, so the probability that there is no frame is therefore P0 = e-2G Using the formula S = G P0, we obtain: The maximum throughput occurs at G = 0.5. For G = 0.5 we get S = 1/2e = 0.184

Slotted ALOHA Assumptions all frames same size time is divided into equal size slots, time to transmit 1 frame nodes start to transmit frames only at beginning of slots nodes are synchronized if 2 or more nodes transmit in slot, all nodes detect collision Operation when node obtains fresh frame, it transmits in next slot no collision, node can send new frame in next slot if collision, node retransmits frame in each subsequent slot with prob. p until success DataLink Layer

Slotted ALOHA Pros single active node can continuously transmit at full rate of channel highly decentralized: only slots in nodes need to be in sync simple Cons collisions, wasting slots idle slots nodes may be able to detect collision in less than time to transmit packet clock synchronization DataLink Layer

Figure 12.6 Frames in a slotted ALOHA network

Figure 12.7 Vulnerable time for slotted ALOHA protocol

Slotted ALOHA The time is divided into discrete intervals, each interval corresponding to one frame. The users will need to be synchronized with the beginning of the slot Special station can emit a pip at the start of each interval A computer is not allowed to send data at any arbitrary times, it will be forced to wait until the next valid time interval Since the vulnerable period is now halved, the throughput of this method would be: Slotted ALOHA peaks at G=1 :: so S=1/e=.368 (i.e. 37 % success)…..a small increase in channel load will drastically reduce its performance.

Pure ALOHA vs. Slotted ALOHA Throughput versus offered traffic for ALOHA systems.

CSMA Protocols Are protocols in which stations listen for a carrier (i.e. transmission) and act accordingly Networks based on these protocols can achieve better channel utilization than 1/e Protocols 1 persistent CSMA Non persistent CSMA p persistent CSMA CSMA CD

1 Persistent CSMA 1 persistent CSMA When a station has data to send, it first listens to the channel If channel is busy, the station waits until the channel is free. When detects an idle channel, it transmits the frame If collision occurs, it will wait an random amount of time and starts again The protocol is called 1 persistent, because the station sends with probability of 1 when finds the channel idle, meaning that is continuously listening Propagation delay The propagation delay has an important effect on the performance of the protocol. There is a small chance that just after a station begins sending, another station will sense the channel and start sending (before the signal from the first one reached it). In this situation a collision can occur. The longer the propagation delay, the more important this effect becomes, and the worse the performance of the protocol. Even if the propagation delay is zero, there will still be collisions – imagine two station wanting to transmit data at the same time. But a third one is buy transmitting. Both station will wait until the third will finish is transmission, will sense idle channel and will start sending.

Non Persistent CSMA Before sending a station senses the channel. If no activity, it sends its frame If channel is busy, then will not continue to sense the channel until it becomes idle, but it will retry at a latter time (waiting a random period of time and repeating the algorithm) With this algorithm, fewer collisions will happen; thus better channel utilization but with longer delays than 1 persistent CSMA algorithm

p Persistent CSMA It applies to slotted channels When a station becomes ready to send, it senses the channel. If it is idle will transmit with a probability of p. With a probability of q it defers to the next slot. If next slot is also idle, it transmits or it defers again with probabilities of p and q This process is repeated until the frame gets either transmitted or another station it began transmission For latter case, the unlucky station acts the same as it would have been a collision (waits a random time and starts again)

Persistent and Non-persistent CSMA Comparison of the channel utilization versus load for various random access protocols.

CSMA with Collision Detection An improvement over CSMA protocols is for a station to abort its transmission when it senses a collision. If two stations sense the channel idle and begin transmission at the same time, they will both detect the collision immediately; there is no point in continuing to send their frames, since they will be garbled. Rather than finishing the transmission, they will stop as soon as the collision is detected Saves time and bandwidth This protocol is widely used CSMA/CD. In particular is the basis for Ethernet LAN.

CSMA/CD CSMA method that we’ve learnt just now doesn’t specify the procedure following a collision. CSMA/CD augments the algorithm to handle the collision In the CSMA/CD method, a station monitors the medium after it sends a frame to see of the transmission was a successful. If so, the station is finished. If, however, there is a collision, the frame is sent again. To better understand CSMA/CD, see fig 12.12

Figure 12.12 Collision of the first bit in CSMA/CD

Explanation of CSMA/CD in fig 12.12 In the fig, the 1st bits transmitted by the two stations involved in the collision. Although each station continues to send bits in the frame until it detects the collision, it show what happens as the first bits collide. In fig 12.12, station A and C are involved in the collision

At t1, station A starts sending the bits of its frame. At time t2, station C hasn’t yet sensed the 1st bit sent by A. it then start sending its bits of frame which propagate both to the left and right. The collision occurs sometime after time t2. station C detects a collision at time t3 when it receives the 1st bit of A’s frame. Station C immediately abort transmission. Station A detects collision at time t4 when it receives the 1st bit of C’s frame. It also immediately aborts transmission

Minimum frame Size: One of the solution for the case of collision in CSMA/CD method the minimum frame size is determined so that the propagation delay of a frame travel is reduced in order to avoid collision with other frame. Tfr = at least two times Tp Discuss worst case

CSMA with Collision Detection At the point marked t0, a station has finished transmitting its frame. Any other station having a frame to send may now attempt to do so. If two or more stations decide to transmit simultaneously, there will be a collision. Collision can be detected by looking at the power of the line or at the pulse width of the received signal and comparing it with the transmitted signal. After a station detects a collision, aborts its transmission, waits a random period of time and tries again latter. Therefore the CSMA/CD will consist of alternating contention and transmission periods, with idle periods occurring when all stations are quiet. The minimum time to detect a collision is two times the time it takes the signal to propagate from one station to another. In worst case scenario, the two stations can be at the ends of the cable … therefore, the minimum time to detect a collision is the round trip propagation delay for the whole cable segment. The sending station has to monitor the channel for collisions during transmission. Therefore the CSMA/CD is a half duplex system. It is important to realize that the collision detection is an analog process. The station’s hardware must listen to the cable while is transmitting. If what it reads back is different than what it sends, then a collision must have had happen. The implication is that the signal encoding must allow collisions to be detected (i.e. a collision of two 0 V signals will never be detected). For this reason, special encoding is used. CSMA/CD can be in one of three states: contention, transmission, or idle.

CSMA/CA USED IN WIRELESS (WI-FI and etc.) For this lectures pls refer to chapter 12 of text book. Forouzan’s. Page 363 - 390

Collision Free Protocols Collisions adversely affect the system performance, especially if the cable is long and the frames are short The collision free protocols solve the contention for the transmission channel without an collisions at all N stations are assumed to be connected to the same transmission channel Protocols Bit-Map Protocol Binary Countdown

Collision-Free Protocols (1) The basic bit-map protocol. Each contention period consists of exact N slots. If station 0 has a frame to send, then it transmits a slot during zero-th contention slot. No other station is allowed to transmit during this slot. Regardless of what station 0 does, station 1 gets the opportunity to transmit a 1 bit during the contention slot 1, but only if it wants to send a frame (has a queued frame). After all N slots have passed, each station has complete knowledge of which stations whish to transmit. Al that point they begin transmitting in numerical order. Since everyone agrees who goes next, there is no collisions. Protocols like this are called RESERVATION PROTOCOLS. If station j has a frame to send, it will transmit a 1 in j-th contention slot

Collision-Free Protocols (2) The binary countdown protocol. A dash indicates silence. A problem with bit map protocols is that the overhead per station is fixed (on bit), therefore it is not scaling well with large number of stations. In binary countdown protocol, all stations will have same length addresses. A station wanting to use the channel broadcasts its address as a binary bit string, starting with the high order bit. The bits in each address position, from each station are BOOLEAN OR-ed together. This is called binary countdown. All the stations will see the result of the OR operation instantaneously. So an station that placed an 0 on the channel sees a 1, than it will stop trying. A higher priority station wants to transmit therefore it has to stop trying this time. In other words, as soon as a station has seen that a high order bit in its address with value 0 has been overwritten with a 1, it gives up. Consider the stations 0010, 0100, 1001 and 1010 are all trying to get the channel. Station having address 1010 gets the channel (due to the fact that this protocol is giving priority to the stations with higher address).

References Andrew S. Tanenbaum – Computer Networks, ISBN 0-13-066102-3