ICE 1332/0715 Mobile Computing (Summer, 2008)

Similar documents
Aloha and slotted aloha

Mohamed Khedr.

CSE 461: Wireless Networks

Mobile Communications Chapter 3 : Media Access

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

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

Wireless Local Area Network (IEEE )

Medium Access Control. IEEE , Token Rings. CSMA/CD in WLANs? Ethernet MAC Algorithm. MACA Solution for Hidden Terminal Problem

IEEE Medium Access Control. Medium Access Control

Multiple Access Links and Protocols

Logical Link Control (LLC) Medium Access Control (MAC)

Computer Communication III

Unit 7 Media Access Control (MAC)

Chapter 12 Multiple Access 12.1

CMPE 257: Wireless and Mobile Networking

Chapter 3 MEDIA ACCESS CONTROL

Rahman 1. Application

CSE 6811 Ashikur Rahman

The MAC layer in wireless networks

ECEN 5032 Data Networks Medium Access Control Sublayer

Wireless Communications

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

Data and Computer Communications. Chapter 13 Wireless LANs

CS 348: Computer Networks. - WiFi (contd.); 16 th Aug Instructor: Sridhar Iyer IIT Bombay

The MAC layer in wireless networks

Lecture 16: QoS and "

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

CMPE 257: Wireless and Mobile Networking

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

CSE 461: Multiple Access Networks. This Lecture

EE 122: Ethernet and

Media Access Control in Ad Hoc Networks

Midterm Review EECS 122. University of California Berkeley

Chapter 1 Basic concepts of wireless data networks (cont d)

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

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

CSC344 Wireless and Mobile Computing. Department of Computer Science COMSATS Institute of Information Technology

standard. Acknowledgement: Slides borrowed from Richard Y. Yale

MAC in /20/06

CSCD 433 Network Programming Fall Lecture 7 Ethernet and Wireless

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

Topics for Today. More on Ethernet. Wireless LANs Readings. Topology and Wiring Switched Ethernet Fast Ethernet Gigabit Ethernet. 4.3 to 4.

Multiple Access Technique. Media Access Control (Intro.) Outline. Multiple Access Technique. Designing Issues of MAC protocols. Protocols examples

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

MAC LAYER. Murat Demirbas SUNY Buffalo

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

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

Wireless Local Area Networks (WLANs) Part I

Wireless Local Area Networks. Networks: Wireless LANs 1

Wireless MACs: MACAW/802.11

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

ICE 1332/0715 Mobile Computing (Summer, 2008)

COMP/ELEC 429/556 Introduction to Computer Networks

Data Communications. Data Link Layer Protocols Wireless LANs

Chapter 6 Medium Access Control Protocols and Local Area Networks

MAC protocols. Lecturer: Dmitri A. Moltchanov

Wireless LANs. ITS 413 Internet Technologies and Applications

Performance anomaly of b

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

4.3 IEEE Physical Layer IEEE IEEE b IEEE a IEEE g IEEE n IEEE 802.

Chapter 4. The Medium Access Control Sublayer

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

SENSOR-MAC CASE STUDY

Chapter 6 Wireless and Mobile Networks. Csci 4211 David H.C. Du

Protocols for Multiaccess Networks

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

Computer Network Fundamentals Spring Week 3 MAC Layer Andreas Terzis

CSE/EE 461 Wireless and Contention-Free Protocols

04/11/2011. Wireless LANs. CSE 3213 Fall November Overview

Strengthening Unlicensed Band Wireless Backhaul

Link Layer: Retransmissions

CMPE 257: Wireless and Mobile Networking

CSMA/CD (Collision Detection)

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

Embedded Internet and the Internet of Things WS 12/13

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

MSIT 413: Wireless Technologies Week 8

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

Internet Protocol Stack

ECE442 Communications Lecture 3. Wireless Local Area Networks

Multiple Access Protocols

Multiple Access. Data Communications and Networking

Medium Access Control

Medium Access Control Sublayer

Telecommunication Protocols Laboratory Course. Lecture 2

Lecture 25: CSE 123: Computer Networks Alex C. Snoeren. HW4 due NOW

6th Slide Set Computer Networks

ECE 358 MAC Examples. Xuemin (Sherman) Shen Office: EIT 4155 Phone: x

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

Lecture 24: CSE 123: Computer Networks Stefan Savage. HW4 due NOW

Wireless LAN -Architecture

Wireless Transmission and Mobility

Redes de Computadores. Medium Access Control

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

Link Layer. (continued)

Wireless Network Security Spring 2014

Ethernet. Introduction. CSE 3213 Fall 2011

Lecture 9: Bridging. CSE 123: Computer Networks Alex C. Snoeren

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

CSE 461 Multiple Access. David Wetherall

Transcription:

ICE 1332/0715 Mobile Computing (Summer, 2008) Medium Access Control Prof. Chansu Yu http://academic.csuohio.edu/yuc/ Simplified Reference Model Application layer Transport layer Network layer Data link layer Physical layer Location/context-sensitive services Multimedia applications congestion and flow control quality of service addressing, routing, device location hand-over Authentication Multiplexing of multiple data streams Correction of transmission errors Media access control Modulation Generation of carrier frequency Frequency selection Signal detection 2 1

Centralized Protocols Base station coordinates access to the wireless channel Node Disadvantages: 1 Base Station Node n 3 Node 2 Node 3 If a node cannot talk to the base station, it cannot transmit to any other nodes Base station needs to keep track of state of other nodes Hard to use failure-prone nodes as coordinators in centralized protocols Distributed Protocols All nodes have identical responsibilities Arbitration difficulty Random access mechanism May incur many conflicts Performs carrier sensing before actually transmitting Node 1 Node 3 Wireless LAN Node 2 Node n 4 2

Two medium access methods TDMA-based fixed allocation methods TDMA assigns frequencies to channels for a certain amount of time Requires sender-receiver synchronization Contention-based random access methods Aloha - classical and slotted Carrier Sense Multiple Access (CSMA) Demand Assigned Multiple Access (DAMA) Multiple Access with Collision Avoidance (MACA) 5 TDMA Method PRMA (Packet Reservation Multiple Access) AP broadcasts the reservation status (e.g., 7 th slot is empty) Nodes compete for empty slots according to the Slotted Aloha principle Once a station reserves a slot successfully, this slot is automatically assigned to this station in all following frames as long as the station has data to send Competition for this slots starts again as soon as the slot was empty in the last frame reservation ACDABA-F frame 1 ACDABA-F frame 2 AC-ABAFframe 3 A---BAFD frame 4 ACEEBAFD frame 5 6 1 2 3 4 5 6 7 8 time-slot A C D A B A F A C A B A A B A F A B A F D A C E E B A F D collision at reservation attempts t 3

Reservation TDMA Every frame consists of N mini-slots and x data-slots Every node has its own mini-slot and can reserve up to k dataslots using this mini-slot (i.e. x = N * k) Other nodes can send data in unused data-slots based on round-robin or Aloha scheme N mini-slots N * k data-slots e.g. N=6, k=2 Node 1 reserves one data slot Node 2 reserves two data slots other nodes can use free data-slots 7 Random access methods: Aloha Mechanism Simply transmits and waits for ack for some time. Repeats if timeout Slotted Aloha additionally uses time-slots, sending must always start at slot boundaries collision Aloha sender A sender B sender C Slotted Aloha sender A sender B sender C collision t t How do you compare? 8 4

MAC Analysis: ALOHA (No CS) Parameters T = packet transmission time (average) G = number of packets attempted during T (including retransmissions) Vulnerable period 9 MAC Analysis: ALOHA How often and in which intervals are packets transmitted? Packet inter-arrival time is assumed to be exponentially distributed I.e., F(t) = Prob[inter-arrival time t] = e -λt : exponential function, where λ is average packet rate (G/T) Thus, f(x,t) = Prob[there are x packets during t] = (λt) x e -λt /x! : Poisson distribution 10 5

*Exponential Distribution packets 1.0 f( ) For example, 10 packets (=G) / 10 usec. (=T) => Average inter-arrival time is 1usec. => Its distribution can be quite different. 0.5 f( ) f( ) Area=1 1us 11 0.5us 1.5us Exponential is one of those distributions which has the following shape. When inter-arrival time follows exponential distribution, the number of packets (x) during t follows Poisson: (λt) x e -λt /x! Thus, zero packet during t follows: e -λt f( ) 1us e -t 1us MAC Analysis: ALOHA Channel throughput S No. successful packets during T among G attempts = No. attempted packets during T * Prob[no collision] Prob[no collision] = Prob[no additional packets during vulnerable period ] Vulnerable period = 2T Thus, S = G*f(0,2T) = Ge -2G (Because, λ=g/t) Channel throughput S for slotted ALOHA Vulnerable period =??? Thus, S = G*f(0,???) = Ge -??? 12 6

MAC Analysis: ALOHA Efficiency Plot TDMA max performance with large number of users along a 1Mbps channel = 1Mbps Pure ALOHA max performance with large number of users = 180Kbps S cannot be larger than 1 & S cannot be larger than G. How can G be larger than 1: retransmission Pure ALOHA max performance with one user = 1Mbps S (Throughput per Packet Time).40.30.20.10 Pure Aloha Slotted Aloha 0 0.5 1.0 1.5 2.0 3.0 G (Attempts per Packet TIme) 13 0.18 packets were successful out of 0.5 attempted packets. What happen to 0.32 packets? => Retransmission Thus, input rate becomes 0.82 Random access method: CSMA Channel efficiency is only 18% for Aloha, 36% for Slotted Aloha It is acceptable when offered traffic is light but generally not acceptable The main problem is collisions CSMA (Carrier sense multiple access) algorithm reduces collision probability by first sensing the medium Vulnerable period =??? 14 7

Basic Carrier Sense Approach Carrier Sense Multiple Access with Collision Detect (CSMA/CD) Used in Ethernet Distributed, no central authority granting access When to transmit 1-persistent : start transmission with prob 1 when idle p-persistent : start transmission with prob p when idle non-persistent : wait a random time and check Characteristics Max packet size & Min interpacket gap to reduce starvation probability Collision detection is free Exponential backoff strategy when collision detect 15 CSMA in Wireless Networks Signal strength decreases with square of distance Hidden terminals A sends to B, C cannot receive A A B C wants to send to B, C senses a free medium (CS fails) Collision at B not detected by A (CD fails): C is hidden from A C Collision is detected at the receiver but not at the source (unlike Ethernet)!! 16 8

CSMA in Wireless Networks Signal strength decreases with square of distance Hidden terminals A sends to B, C cannot receive A A C wants to send to B, C senses a free medium (CS fails) Collision at B not detected by A (CD fails): C is hidden from A Exposed terminals B sends to A, C wants to send to another terminal (not A or B) C has to wait, CS signals a medium in use But waiting is not necessary: C is exposed to B B C Collision is detected at the receiver but not at the source (unlike Ethernet)!! 17 Collision Avoidance instead of Collision Detection Reduce collision probability by first sensing the medium Not sufficient, given hidden terminals Uses short signaling packets for collision avoidance Request To Send (RTS): a sender first requests the right to send from a receiver Clear To Send (CTS): the receiver grants the right to send as soon as it is ready to receive CSMA with Collision Avoidance (CSMA/CA) or Multiple Access with Collision Avoidance (MACA ) Available in IEEE802.11 18 9

RTS/CTS Solves Hidden & Exposed Terminal Problems Hidden Terminal CTS from B to A is also heard by C, which then waits RTS CTS CTS A B C Exposed Terminal C doesn t hear A s CTS and concludes A is outside its range C can start its transmission 19 RTS RTS CTS A B C Contention & Backoff Algorithm to Further Reduce Collisions Carrier sense When a node wishes to transmit a packet, it first waits until the channel is idle Collision avoidance RTS/CTS avoids collisions from hidden terminals (Virtual carrier sensing or VCS) Further collision avoidance If medium is idle when the packet is ready, just send it However, when the medium was busy and becomes idle, the node waits for a randomly chosen duration before attempting to transmit Contention & backoff algorithm 20 10

Example: 802.11 MAC Data ready DIFS Data Ready CW = CWmin Medium idle Transmit frame if medium is free DIFS Wait for IFS duration Check medium Check medium Still idle Transmit frame Wait for ACK or ACK timeout ACK received 21 Done DIFS DIFS contention window (randomized back-off mechanism) Data Ready CW = CWmin medium busy (other station starts comm) medium becomes free again slot time next frame t Medium idle Wait until current transmission ends Wait for IFS duration Wait for IFS duration Still idle No No Still idle Transmit frame Choose backoff time between (0, CW-1) and wait. (Use frozen backoff time if it exists) Wait for ACK or ACK timeout ACK received Done Backoff time expired Medium busy (Freeze backoff time) 22 11

Example: IEEE 802.11 MAC Node 1 B1 = 25 wait Use the frozen backoff intervals - why? B1 = 5 data Node 2 B2 = 20 Node 2 wins data Node 1 wins B2 = 15 wait B2 = 10 Randomly chosen backoff intervals between [0, 31], i.e., cw=31 23 Other MAC Protocols Issues Hidden Terminal Problem and Collision avoidance Reliability Congestion control Energy efficiency Fairness 24 12

(2) Reliability Wireless links are prone to errors High packet loss rate detrimental to transport-layer performance. Mechanisms needed to reduce packet loss rate experienced by upper layers A simple solution Acknowledgement (Ack) Retransmission A B C 25 Example: IEEE 802.11 MAC Uses ACK to achieve reliability 2-way handshake: Data-Ack 4-way handshake: RTS-CTS-Data-Ack RTS CTS CTS A B C Data ACK ACK A B C What makes C from causing interference? NAV (Network Allocation Vector) in RTS and CTS 26 13

4-Way Handshake (RTS-CTS-Data-Ack) sender receiver idle idle ACK RxBusy time-out; RTS packet ready to send; RTS wait for the right to send CTS; data time-out; RTS data; ACK time-out data; RTS; CTS wait for ACK wait for data ACK: positive acknowledgement RxBusy: receiver busy 27 RTS; RxBusy Link-level ACK Usually not used in wired networks In wired networks, TCP-level ack is used to achieve reliability as well as to alleviate the congestion problem via sliding window protocol Link-level ack is overkilling In mobile networks, Link-level ack is used to provide comparable link-level reliability But it competes with Data as well as with TCP-level ack 28 14

(3) Congestion Control The time spent counting down backoff intervals is a part of MAC overhead Choosing a large cw leads to large backoff intervals and can result in larger overhead Choosing a small cw leads to a larger number of collisions (when two nodes count down to 0 simultaneously) 29 Example: Binary Exponential Backoff in 802.11 MAC Since the number of nodes attempting to transmit simultaneously may change with time, some mechanism to manage congestion is needed IEEE 802.11 DCF: Congestion control achieved by dynamically choosing the contention window cw When a node fails to receive CTS (ACK) in response to its RTS (Data), it increases the contention window: cw is doubled (up to an upper bound) When a node successfully completes a data transfer, it restores cw to CWmin 30 15

Data Ready CW = CWmin Medium idle No Wait until current transmission ends Wait for IFS duration Wait for IFS duration CW = CW 2 if CW is not CWmax Still idle No No Still idle No Transmit frame Choose backoff time between (0, CW-1) and wait. (Use frozen backoff time if it exists) Maximum retransmissions reached ACK timeout Wait for ACK or ACK timeout ACK received Backoff time expired Medium busy (Freeze backoff time) Drop packet Done Congestion control 31 MILD Algorithm in MACAW When a node fails to receive CTS in response to its RTS, it multiplies cw by 1.5 Similar to 802.11, except that 802.11 multiplies by 2 When a node successfully completes a transfer, it reduces cw by 1 Different from 802.11 where cw is restored to Cwmin In 802.11, cw reduces much faster than it increases MACAW: cw reduces slower than it increases Exponential Increase Linear Decrease MACAW can avoid wild oscillations of cw when congestion is high 32 16

Reading Assignment * See ns-2 manual Chap. 16 Chap. 18 * See 802.11 standard Section 5.1~4 Section 7 Section 9.1~2 Section 11.1~3 33 17