ECEN 5032 Data Networks Medium Access Control Sublayer

Similar documents
LECTURE PLAN. Script. Introduction about MAC Types o ALOHA o CSMA o CSMA/CD o CSMA/CA

ECE453 Introduction to Computer Networks. Broadcast vs. PPP. Delay. Lecture 7 Multiple Access Control (I)

Chapter 4 (Week 7) The Medium Access Control Sublayer ANDREW S. TANENBAUM COMPUTER NETWORKS FOURTH EDITION PP CN&DC Dr.

Chapter 12 Multiple Access 12.1

Jaringan Komputer. Broadcast Network. Outline. MAC (Medium Access Control) Channel Allocation Problem. Dynamic Channel Allocation

Chapter 4. The Medium Access Control Sublayer. Points and Questions to Consider. Multiple Access Protocols. The Channel Allocation Problem.

MAC Sublayer(1) Principal service of the Medium Access Control Sublayer: Allocating a single broadcast channel (mostly a LAN) among competing users

The Medium Access Control Scheme (MAC Layer) Reference: Andrew S. Tanenbaum, Computer Networks, 3rd Edition, Prentice Hall, 1996.

Multiple Access. Data Communications and Networking

COS 140: Foundations of Computer Science

Unit 7 Media Access Control (MAC)

CS 43: Computer Networks. 27: Media Access Contd. December 3, 2018

Link Layer: Retransmissions

COS 140: Foundations of Computer Science

LANs. Local Area Networks. via the Media Access Control (MAC) SubLayer. Networks: Local Area Networks

CMPE 257: Wireless and Mobile Networking

Aloha and slotted aloha

Telecommunication Protocols Laboratory Course. Lecture 2

Random Access. 1. Aloha. 2. Slotted Aloha 3. CSMA 4. CSMA/CD

ICE 1332/0715 Mobile Computing (Summer, 2008)

CSE 461: Multiple Access Networks. This Lecture

CHAPTER 7 MAC LAYER PROTOCOLS. Dr. Bhargavi Goswami Associate Professor & Head Department of Computer Science Garden City College

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

Data Link Layer: Collisions

Wireless Local Area Networks. Networks: Wireless LANs 1

Computer Network Fundamentals Spring Week 3 MAC Layer Andreas Terzis

Chapter 6 Medium Access Control Protocols and Local Area Networks

Multiple Access Protocols

CS 43: Computer Networks Media Access. Kevin Webb Swarthmore College November 30, 2017

CSE 461: Wireless Networks

CSE 461 Multiple Access. David Wetherall

The MAC layer in wireless networks

EE 122: Ethernet and

Wireless Communications

Medium Access Control. CSCI370 Lecture 5 Michael Hutt New York Institute of Technology

Markov Chains and Multiaccess Protocols: An. Introduction

ECE 4450:427/527 - Computer Networks Spring 2017

The MAC layer in wireless networks

Computer Communication III

Wireless Local Area Networks (WLANs)) and Wireless Sensor Networks (WSNs) Computer Networks: Wireless Networks 1

LANs Local Area Networks LANs provide an efficient network solution : To support a large number of stations Over moderately high speed

Data Link Layer -2- Network Access

Chapter 4. The Medium Access Control Sublayer

Multiple Access Links and Protocols

CMPE 257: Wireless and Mobile Networking

Medium Access Control. MAC protocols: design goals, challenges, contention-based and contention-free protocols

Contention Protocols and Networks

Lecture 4: Wireless MAC Overview. Hung-Yu Wei National Taiwan University

COMPUTER NETWORKS - Local area networks

Local area networks. Copyright

Data Link Layer -2- Network Access

Ethernet. Introduction. CSE 3213 Fall 2011

Computer Networks. Medium Access Sublayer (Part I)

Medium Access Control Sublayer

CSE/EE 461 Wireless and Contention-Free Protocols

The Medium Access Control Sublayer

Mohamed Khedr.

Data Link Layer, Part 5. Medium Access Control

Computer Networks Medium Access Control. Mostafa Salehi Fall 2008

Protocols for Multiaccess Networks

Medium Access Control Sublayer Chapter 4

COMP/ELEC 429/556 Introduction to Computer Networks

Local Networks. Lecture 4 6-Apr-2016

Announcements / Wireless Networks and Applications Lecture 9: Wireless LANs Wireless. Regular Ethernet CSMA/CD.

Redes de Computadores. Medium Access Control

Media Access Control in Ad Hoc Networks

EITF25 Internet Techniques and Applications L4: Network Access. Stefan Höst

Medium Access Control Sublayer Chapter 4

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

Data and Computer Communications. Chapter 11 Local Area Network

Chapter 4: The Medium Access Layer

Access Technologies! Fabio Martignon

Wireless Medium Access Control Protocols

Wireless MACs: MACAW/802.11

Random Assignment Protocols

Goals. Fundamentals of Network Media. More topics. Topics. Multiple access communication. Multiple access solutions

Outline. Introduction to Networked Embedded Systems - Embedded systems Networked embedded systems Embedded Internet - Network properties

Outline / Wireless Networks and Applications Lecture 9: Wireless LANs Aloha and 802 Wireless. Regular Ethernet CSMA/CD

Lecture 6. Data Link Layer (cont d) Data Link Layer 1-1

IEEE Medium Access Control. Medium Access Control

Intelligent Transportation Systems. Medium Access Control. Prof. Dr. Thomas Strang

Overview. Wireless networks basics IEEE (Wi-Fi) a/b/g/n ad Hoc MAC protocols ad Hoc routing DSR AODV

Link Layer. (continued)

CSMA/CD (Collision Detection)

Chapter 6 Medium Access Control Protocols and Local Area Networks

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

TSIN01 Information Networks Lecture 3

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

MAC LAYER. Murat Demirbas SUNY Buffalo

Data and Computer Communications

Lecture 12 December 04, Wireless Access. Graduate course in Communications Engineering. University of Rome La Sapienza. Rome, Italy

IEEE , Token Rings. 10/11/06 CS/ECE UIUC, Fall

Medium Access Control

Multiple Access (1) Required reading: Garcia 6.1, 6.2.1, CSE 3213, Fall 2010 Instructor: N. Vlajic

Wireless Local Area Networks (WLANs) and Wireless Sensor Networks (WSNs) Primer. Computer Networks: Wireless LANs

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

Data Link Layer, Part 3 Medium Access Control. Preface

Wireless Communication and Networking CMPT 371

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

CS/ECE 439: Wireless Networking. MAC Layer Road to Wireless

Transcription:

ECEN 5032 Data Networks Medium Access Control Sublayer Peter Mathys mathys@colorado.edu University of Colorado, Boulder c 1996 2005, P. Mathys p.1/35

Overview (Sub)networks can be divided into two categories: 1. Those using point-to-point connections (e.g., leased line). 2. Those using broadcast connections (e.g., wireless LANs). In a broadcast network one of the key issues is how to determine who gets to use the channel when there is competition for it. Broadcast channels are often referred to as multiaccess channels or random access channels. Real life example: Meeting between several people: After one speaker finishes, who gets to talk next? More tricky: Conference call (cannot use external means to avoid chaos, e.g., by raising hands). c 1996 2005, P. Mathys p.2/35

Medium Access Control The protocols used to determine who goes next on a multiaccess channel belong to the MAC (medium access control) sublayer. The MAC sublayer is a sublayer of the data link layer (DLL). The MAC sublayer is expecially important for LANs. WANs, in contrast, use point-to-point links, except for satellite networks. Examples of MAC protocols are the CSMA/CD protocol used by Ethernet, and the CSMA/CA protocol used by 802.11 wireless LANs. c 1996 2005, P. Mathys p.3/35

Static Channel Allocation Traditional ways of allocating channels are TDM (time division multiplexing) and FDM (frequency division multiplexing). If there are users, time gets divided up into time slots for TDM, or bandwidth gets divided up into frequency slots for FDM. If is large and not all users transmit at all times, a lot of transmission capacity is wasted with static TDM or FDM allocations. In addition, in most computer systems data traffic is very bursty, e.g., peak to mean traffic ratio of 1000:1 c 1996 2005, P. Mathys p.4/35

Static Channel Allocation Simple example: M/M/1 queue (memoryless Poisson arrivals with rate and memoryless Poisson departures with rate ): where is the average delay of a frame and is the channel capacity. Now divide this up into static subchannels, each with capacity and arrival rate to obtain resulting in an increase of the delay by a factor of. c 1996 2005, P. Mathys p.5/35

Dynamic Channel Allocation Key assumptions: 1. Station model. There are independent stations or terminals. Arrival rate is (probability of frame generated in interval of length is ). Terminals can have at most one frame to transmit at any given time. 2. Single Channel Assumption. A single channel is available for all communication. All stations can transmit on it and receive from it. All stations are eqivalent in hardware, but protocol software may assign priorities. 3. Collision Assumption. If two or more terminals transmit at the same time, a collision results and the frame must be retransmitted at a later time. All stations can detect collisions and there are no other errors than collisions. c 1996 2005, P. Mathys p.6/35

Dynamic Channel Allocation Key assumptions (contd.): 4. Continuous/Slotted Time. If channel time is continuous, frame transmission can sart at any time. If channel time is slotted, then frame transmissions must always begin at the start of a slot. A slot may be idle (0), contain exactly one frame (1), or a collision (C). 5. Carrier Sense (Y/N). If carrier sensing is used, stations can tell if the channel is in use before trying to use it. In this case stations wait until the channel is idle before starting a new transmission. Wired LANs generally have carrier sense, while in wireless networks not all stations may be within radio range of other stations so that carrier sensing cannot be relied upon. Key assumption is single (collision) channel. No other means of communication. c 1996 2005, P. Mathys p.7/35

ALOHA The ALOHA network was developed around 1970 to provide radio communication between the central computer and various data terminals at the campuses of the University of Hawaii. The basic idea of ALOHA is to let users transmit frames whenever they have data to send. If frames collide, they are retransmitted after a random amount of time. It is assumed that each station can determine whether a collision happened or not. If there is no collision, transmission is assumed to be successful. c 1996 2005, P. Mathys p.8/35

Pure ALOHA Example In pure ALOHA, frames are transmitted at completely random times. c 1996 2005, P. Mathys p.9/35

Pure ALOHA Pure ALOHA: Vulnerable period for shaded frame. c 1996 2005, P. Mathys p.10/35

Pure ALOHA Throughput Successfull frames leave system at rate and arrivals occur at rate, leading to a hypothetic equilibrium point as shown. Necessary condition:. c 1996 2005, P. Mathys p.11/35

Slotted ALOHA In 1972 a method for doubling the throughput of a (pure) ALOHA system was published. The key idea is to divide time into discrete intervals, each corresponding to the length of a frame. Under this method, known as slotted ALOHA, a computer is required to wait for the beginning of a slot before it can transmit data. This reduces the vulnerable period to the length of one frame and consequently the throughput becomes which peaks at and yields. c 1996 2005, P. Mathys p.12/35

Slotted ALOHA Throughput Successfull frames leave system at rate and arrivals occur at rate, leading to a hypothetic equilibrium point as shown. Necessary condition:. c 1996 2005, P. Mathys p.13/35

CSMA In (wired) local area networks it is possible for each station to detect what other stations are doing and adapt their behavior accordingly. Protocols in which stations listen for a carrier on the channel are called carrier sense protocols. CSMA stands for carrier sense multiple access. There are two types of CSMA protocols: persistent and nonpersistent CSMA. CSMA/CD stands for carrier sense multiple access with collision detection. c 1996 2005, P. Mathys p.14/35

Persistent CSMA 1-persistent CSMA works as follows: When a station has data to send, it first listens to the channel to see if anyone else is already transmitting. When the channel is idle, the station transmits its frame. When the channel is busy, the station waits until it becomes idle, and then transmits with probability 1 (hence the name 1-persistent). If a collision occurs during transmission, the station waits a random amount of time and then starts all over again. c 1996 2005, P. Mathys p.15/35

Effect of Propagation Delay When two or more stations start transmitting at about the same time instant, they may not be able to sense each other s transmissions because of the propagation delays between different stations. Thus, when 1-persistent CSMA is used, there is a good chance that after one transmission ends, two or more new stations start transmitting and collide. Such collisions can be avoided if not all stations that become ready to transmit start sending immediately after the previous transmission ends. The resulting protocols are nonpersistent or p-persistent versions of CSMA. c 1996 2005, P. Mathys p.16/35

Nonpersistent CSMA Nonpersistent CSMA works as follows: Before sending, a station senses the channel. If the channel is idle, the station starts transmitting. If the channel is busy, the station waits a random amount of time (without sensing the channel) before it repeats the algorithm. This leads to longer delays, but better channel utilization than 1-persistent CSMA. c 1996 2005, P. Mathys p.17/35

p-persistent CSMA For slotted channels p-persistent CSMA can be used. It works like this: When a station becomes ready to transmit, it senses the channel. If the channel is idle, the station starts transmitting with probability. With probability it defers until the next slot. If the next slot is also idle, it transmits or defers again, with probabilities or. This process is repeated until either the frame gets transmitted or another station started transmitting. In the latter case the station acts as if there had been a collision (i.e., waits a random amount of time and starts again). If the station initially senses the channel busy, it waits until the next slot and applies the above algorithm. c 1996 2005, P. Mathys p.18/35

Throughput for CSMA Versions The smaller is for p-persistent CSMA the better the throughput becomes, at the cost of a (much) longer average transmission delay. c 1996 2005, P. Mathys p.19/35

CSMA/CD If the length of a standard frame is much longer than the propagation delay between stations, the performance of CSMA can be improved by aborting transmissions as soon as a collision is detected. Thus, if two stations sense the channel to be idle and begin transmitting simultaneously, they abort their transmissions as soon as they detect the collision. The resulting protocol is known as CSMA/CD (carrier sense multiple access with collision detection). CSMA/CD is the basis of Ethernet LANs. Under CSMA/CD the channel can be in one of three states: (i) Transmitting single frames, (ii) resolving contentions, or (iii) idle. The main feature is that the CD part shortens the amount of time that is spent to resolve contentions. c 1996 2005, P. Mathys p.20/35

CSMA/CD CSMA/CD can be in one of three states: Contention, transmission, or idle. c 1996 2005, P. Mathys p.21/35

Effect of Propagation Delay The figure above illustrates the fact that a station can only be sure to have seized the channel after transmitting for without hearing a collision. c 1996 2005, P. Mathys p.22/35

Binary Exponential Backoff In Ethernet, time is divided into slots of length (where is the worst-case propagation delay in the network) after a collision occurs. After the first collision, each station waits either 0 or 1 slot times (at random) before trying to retransmit. If that results in another collision, each station now waits 0, 1, 2, or 3 slot times (at random) before trying to retransmit. Each time when another collision occurs the number of slots to wait is chosen at random from a set of numbers that has twice the size of the previous set, up to the interval. This algorithm, which in essence stabilizes the underlying slotted ALOHA system, is called binary exponential backoff. c 1996 2005, P. Mathys p.23/35

Collision-Free Protocols CSMA/CD is not universally applicable. For instance, if the propagation delay is similar to or much longer than the length of a frame (e.g., on a satellite channel), CD does not help to shorten contention periods. If there is a finite number of stations, then there exist schemes that either avoid collisions altogether, or at least limit the contention to (small) subsets of. An obvious solution is to use TDM or FDM for users, but the goal is to do better than that in the case when only a fraction of all users is typically active at any given time. c 1996 2005, P. Mathys p.24/35

Bit Map Protocol The basic bit-map protocol for stations uses contention slots of 1 bit each. Any station that has a frame to transmit sets the bit in its assigned slot and every other station gets to see this bit. Thus, during the actual transmission phase each station knows when to transmit and when to be silent. Bit-map protocols are part of a larger class called reservation protocols. c 1996 2005, P. Mathys p.25/35

Wireless LAN Protocols A system of notebook computers that communicate by radio can be regarded as a wireless LAN. Wireless LANs have different properties than conventional (wired) LANs and require special MAC sublayer protocols. A common configuration for a wireless LAN consists of base stations (or access points) strategically placed around a building and wired together using copper of fiber. The mobile stations then communicate via radio links with these base stations. If the transmission power of the base and mobile stations is adjusted to have a range of 3-4 meters, then each room becomes a cell in a cellular system. This is similar to a cellular telephone system, except that each cell has only one channel, covering the entire available bandwidth and all stations in the cell. c 1996 2005, P. Mathys p.26/35

Hidden Station Problem Simplifying assumption: All radio transmitters have some fixed range. A transmits to B. If C senses medium, it will not hear A and thus, when it transmits to B a collision results. CSMA cannot be used here because what counts is what B hears, not what A and C hear. The problem of a station not being able to detect a competitor because it is too far away is called the hidden station problem. c 1996 2005, P. Mathys p.27/35

Exposed Station Problem Simplifying assumption: All radio transmitters have some fixed range. B transmits to A. C wants to transmit to D. It senses the medium and falsely concludes that it cannot start sending. Again, what is crucial is what the receiver sees, not what the sender sees. The problem encountered here is called the exposed station problem. c 1996 2005, P. Mathys p.28/35

MACA Protocol MACA stands for mulitple access with collision avoidance. The basic idea is for the sender to stimulate the receiver into sending a short frame, so that stations nearby can detect it and refrain from using the channel during the upcoming (large) data frame. If A wants to send to B it starts by transmitting an RTS (request to send) frame. This short frame contains the length of the data frame that will eventually follow. If B is ready to receive a frame, it responds with a CTS (clear to send) frame. The CTS frame also contains the length of the upcoming data frame. Upon receipt of the CTS frame A begins transmission. Any station that hears RTS is close to A and must remain silent for the CTS to be transmitted back to A. Any station that hears CTS is close to B and must remain silent during the upcoming data frame transmission. c 1996 2005, P. Mathys p.29/35

MACA Protocol (a) A sends RTS to B. (b) B responds with a CTS to A. c 1996 2005, P. Mathys p.30/35

MACAW Protocol MACAW stands for MACA for wireless. It is a fine tuned version of MACA. An ACK frame is sent after each successful data frame (so that retransmissions can be initiated when no ACK is received). CSMA is used to avoid some obvious collisions of RTS frames. Exponential backoff algorithm is run separately for each data stream (source-destination pair). Finally, a mechanism is added for stations to exchange information about congestion and make the backoff algorithm react less violently to temporary problems. c 1996 2005, P. Mathys p.31/35

802.11 MAC Sublayer Protocol The 802.11 MAC sublayer protocol is quite different from the one for Ethernet, due to the different behavior and requirements of the wireless environment. Collision detection with early transmission abort cannot be used due to the inability of radio transceivers to transmit and listen simultaneously. In addition there is the hidden/exposed station problem. 802.11 supports two modes of operation. The first, called DCF (distributed coordination function), uses no central control, similar to Ethernet. The second, called PCF (point coordination function), uses the base station to control all actvity in its cell. All implementations of 802.11 must support DCF, but PCF is optional. c 1996 2005, P. Mathys p.32/35

Hidden/Exposed Stations (a) Hidden station problem. (b) Exposed station problem. c 1996 2005, P. Mathys p.33/35

DCF for 802.11 DCF uses a protocol called CSMA/CA (CSMA with collision avoidance). In this protocol both physical and virtual channel sensing are used. Method 1: When a station wants to transmit, it senses the channel. If it is idle it starts transmitting and sends the entire frame without further channel sensing. If the channel is busy, transmission is deferred until the channel goes idle. If a collision occurs, the colliding stations wait a random time (using binary exponential backoff) and then try again. Method 2: Based on MACAW using virtual channel sensing. A station that wants to transmit sends an RTS frame to request permission to send a data frame. When permission is granted the receiving station returns a CTS frame. Every station that hears either the RTS, the CTS or both knows that a data frame transmission is about to begin and defers transmitting. c 1996 2005, P. Mathys p.34/35

Virtual Channel Sensing A wants to send to B and sends RTS. B responds with CTS. C is within range of A and hears RTS. D is within range of B but not of A. It does not hear RTS but hears CTS. C and D assert a virtual channel busy to themselves, indicated by NAV (network allocation vector). c 1996 2005, P. Mathys p.35/35