Lecture 6: Media Access Control. CSE 123: Computer Networks Stefan Savage



Similar documents
CSE 123A Computer Networks

EECS 122: Introduction to Computer Networks Multiaccess Protocols. ISO OSI Reference Model for Layers

CS263: Wireless Communications and Sensor Networks

CSE331: Introduction to Networks and Security. Lecture 6 Fall 2006

Ethernet. Ethernet Frame Structure. Ethernet Frame Structure (more) Ethernet: uses CSMA/CD

standard. Acknowledgement: Slides borrowed from Richard Y. Yale

Local Area Networks transmission system private speedy and secure kilometres shared transmission medium hardware & software

How To Make A Multi-User Communication Efficient

Attenuation (amplitude of the wave loses strength thereby the signal power) Refraction Reflection Shadowing Scattering Diffraction

Lecture 7 Multiple Access Protocols and Wireless

EPL 657 Wireless Networks

CSMA/CA. Information Networks p. 1

LAN Switching Computer Networking. Switched Network Advantages. Hubs (more) Hubs. Bridges/Switches, , PPP. Interconnecting LANs

TCOM 370 NOTES LOCAL AREA NETWORKS AND THE ALOHA PROTOCOL

Ethernet, VLAN, Ethernet Carrier Grade

ECE 358: Computer Networks. Homework #3. Chapter 5 and 6 Review Questions 1

Medium Access Control (MAC) Protocols for Ad hoc Wireless Networks - III

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

RTT 60.5 msec receiver window size: 32 KB

Wireless LAN Protocol CS 571 Fall Kenneth L. Calvert All rights reserved

Based on Computer Networking, 4 th Edition by Kurose and Ross

CS6956: Wireless and Mobile Networks Lecture Notes: 2/11/2015. IEEE Wireless Local Area Networks (WLANs)

Collision of wireless signals. The MAC layer in wireless networks. Wireless MAC protocols classification. Evolutionary perspective of distributed MAC

What is it all about? Some simple solutions. Multiple Access. Contexts for the multiple access problem. Outline. Contexts

Random Access Protocols

Controlled Random Access Methods

Data Link Protocols. Link Layer Services. Framing, Addressing, link access: Error Detection:

... neither PCF nor CA used in practice

Wiereless LAN

MAC Algorithms in Wireless Networks

10. Wireless Networks

Lecture 17: Wireless Networking"

Final Exam. Route Computation: One reason why link state routing is preferable to distance vector style routing.

IEEE Technical Tutorial. Introduction. IEEE Architecture

ECE/CS 372 introduction to computer networks. Lecture 13

COMP 3331/9331: Computer Networks and Applications

Markku Renfors. Partly based on student presentation by: Lukasz Kondrad Tomasz Augustynowicz Jaroslaw Lacki Jakub Jakubiak

Wireless Networks. Reading: Sec5on 2.8. COS 461: Computer Networks Spring Mike Freedman

Unit of Learning # 2 The Physical Layer. Sergio Guíñez Molinos sguinez@utalca.cl

Wireless LAN Concepts

Ring Local Area Network. Ring LANs

Hello viewers, welcome to today s lecture on cellular telephone systems.

A Technical Tutorial on the IEEE Protocol

Introduction to Ethernet

Algorithms for Interference Sensing in Optical CDMA Networks

Token Ring and. Fiber Distributed Data Interface (FDDI) Networks: Token Ring and FDDI 1

Chapter 7 Low-Speed Wireless Local Area Networks

Module 5. Broadcast Communication Networks. Version 2 CSE IIT, Kharagpur

Direct Link Networks. Introduction. Physical Properties. Lecture - Ethernet 1. Areas for Discussion. Ethernet (Section 2.6)

ECE 333: Introduction to Communication Networks Fall 2002

An Overview of Wireless LAN Standards IEEE and IEEE e

Data Link Layer. Page 1. Ethernet

Real-Time (Paradigms) (51)

Wireless Personal Area Networks (WPANs)

2. What is the maximum value of each octet in an IP address? A. 128 B. 255 C. 256 D. None of the above


WIRELESS ETHERNET (IEEE )

DATA COMMUNICATIONS AND NETWORKING. Solved Examples

Adaptive DCF of MAC for VoIP services using IEEE networks

Local Area Networks. Guest Instructor Elaine Wong. Elaine_06_I-1

Objectives. Lecture 4. How do computers communicate? How do computers communicate? Local asynchronous communication. How do computers communicate?

11/22/

ECE 428 Computer Networks and Security

Data Center Networks, Link Layer Wireless (802.11)

Express Forwarding : A Distributed QoS MAC Protocol for Wireless Mesh

EXAMPLES AND PROBLEMS. Competence Based Education Internet Protocols

Network Categories. Network Types for the Local Range. Ethernet. Carrier Sense Multiple Access

INTRODUCTION TO COMMUNICATION SYSTEMS AND TRANSMISSION MEDIA

Chapter 4. Medium Access Control. IN2P3 Octobre 2002 Jean-Pierre Thomesse

WiFi. Is for Wireless Fidelity Or IEEE Standard By Greg Goldman. WiFi 1

Analog vs. Digital Transmission

ESSENTIALS. Understanding Ethernet Switches and Routers. April 2011 VOLUME 3 ISSUE 1 A TECHNICAL SUPPLEMENT TO CONTROL NETWORK

Bluetooth voice and data performance in DS WLAN environment

EECC694 - Shaaban. Transmission Channel

Medium Access Control (MAC) and Wireless LANs

TCP in Wireless Networks

Lecture 3: Signaling and Clock Recovery. CSE 123: Computer Networks Stefan Savage

Wireless LAN advantages. Wireless LAN. Wireless LAN disadvantages. Wireless LAN disadvantages WLAN:

Chapter 6: Medium Access Control Layer

A Short Look on Power Saving Mechanisms in the Wireless LAN Standard Draft IEEE

Networks. Master of Science (Computer Science and Engineering), December 2004, 45 pp.,

Introduction to Wide-Area WiFi. AfNOG 2009 Wireless Tutorials Cairo

Lab Exercise Objective. Requirements. Step 1: Fetch a Trace

Module 5. Broadcast Communication Networks. Version 2 CSE IIT, Kharagpur

Computer Network. Interconnected collection of autonomous computers that are able to exchange information

Frequency Hopping Spread Spectrum (FHSS) vs. Direct Sequence Spread Spectrum (DSSS) in Broadband Wireless Access (BWA) and Wireless LAN (WLAN)

IEEE Wireless LAN Standard. Updated: 5/10/2011

Overview of Network Hardware and Software. CS158a Chris Pollett Jan 29, 2007.

Protocolo IEEE Sergio Scaglia SASE Agosto 2012

How To Communicate With A Token Ring Network (Dihon)

a. CSMA/CD is a random-access protocol. b. Polling is a controlled-access protocol. c. TDMA is a channelization protocol.

IEEE 802 Protocol Layers. IEEE Wireless LAN Standard. Protocol Architecture. Protocol Architecture. Separation of LLC and MAC.

communication over wireless link handling mobile user who changes point of attachment to network

Transport Layer Protocols

Administrivia. CSMA/CA: Recap. Mobility Management. Mobility Management. Channel Partitioning, Random Access and Scheduling

Mobile Communications Exercise: Satellite Systems and Wireless LANs. Georg von Zengen, IBR, TU Braunschweig,

TABLE OF CONTENTS. Dedication. Table of Contents. Preface. Overview of Wireless Networks. vii xvii

Level 2 Routing: LAN Bridges and Switches

In this Lecture" Access method CDMA" Mobile and Sensor Systems Lecture 2: Mobile Medium Access Control Layer and Telecommunications

Computer Networks. Wireless and Mobile Networks. László Böszörményi Computer Networks Mobile - 1

Transcription:

Lecture 6: Media Access Control CSE 123: Computer Networks Stefan Savage

Today: Media access How to share a channel among different hosts? Channel partitioning FDMA (frequency division multiple access) TDMA (time division multiple access) CDMA (code division multiple access) Random access Contention-based» Aloha» CSMA, CSMA/CD, CSMA/CA» Ethernet, 802.11 Contention-free» Token-ring, FDDI

Channel Partitioning Need to share media with multiple nodes (n) Multiple simultaneous conversations A simple solution Divide the channel into multiple, separate channels Channels are completely separate Bitrate of the channel is split across channels Nodes can only send/receive on their assigned channel Several different ways to do it 3

Frequency Division (FDMA) Divide bandwidth of f Hz into n channels each with bandwidth f/n Hz Easy to implement, but unused subchannels go idle» Also need guard bands between channels to prevent interference Used by traditional analog cell phone service, radio, TV Amplitude Amplitude Frequency Frequency 4

Time Division (TDMA) Divide channel into rounds of n time slots each Assign different hosts to different time slots within a round Unused time slots are idle Used in GSM cell phones & digital cordless phones Example with 1-second rounds n=4 timeslots (250ms each) per round Host # 1 2 3 1 2 3 4 2 4 1 sec 1 sec 1 sec 5

Code Division (CDMA) Do nothing to physically separate the channels All stations transmit at same time in same frequency bands One of so-called spread-spectrum techniques Sender modulates their signal on top of unique code Sort of like the way Manchester modulates on top of clock The bit rate of resulting signal much lower than entire channel Receiver applies code filter to extract desired sender All other senders seem like noise with respect to signal Used in some newer digital cellular technologies (Verizon/Sprint US Cellular) 6

Partitioning Visualization FDMA TDMA power power CDMA power Courtesy Takashi Inoue 7

Problem w/channel partitioning Not terribly well suited for random access usage Why? Instead, design schemes for more common situations Not all nodes want to send all the time Don t have a fixed number of nodes Potentially higher throughput for transmissions Active nodes get full channel bandwidth 8

Aloha Designed in 1970 to support wireless data connectivity Between Hawaiian Islands rough! Goal: distributed access control (no central arbitrator) Over a shared broadcast channel Aloha protocol in a nutshell: When you have data send it If data doesn t get through (receiver sends acknowledgement) then retransmit after a random delay Why not a fixed delay? 9

Collisions Frame sent at t 0 collides with frames sent in [t 0-1, t 0 +1] Assuming unit-length frames Ignores propagation delay 10

Slotted Aloha Time is divided into equal size slots (frame size) Host wanting to transmit starts at start of next slot Retransmit like w/aloha, but quantize to nearest next slot Requires time synchronization between hosts Success (S), Collision (C), Empty (E) slots 11

Channel Efficiency Q: What is max fraction slots successful? A: Suppose n stations have packets to send Each transmits in slot with probability p Prob[successful transmission], S, is: S = p (1-p) (n-1) 0.4 At best: channel used for useful transmissions 37% of time! any of n nodes: S = Prob[one transmits] = np(1-p) (n-1) (optimal p as n->infinity = 1/n) = 1/e =.37 0.3 0.2 0.1 0.5 1.0 1.5 2.0 offered load = n X p Slotted Aloha Pure Aloha 12

Carrier Sense (CSMA) Aloha transmits even if another host is transmitting Thus guaranteeing a collision Instead, listen first to make sure channel is idle Useful only if channel is frequently idle Why? Listen how long to be confident channel is idle? Depends on maximum propagation delay Small (<<1 frame length) for LANs Large (>>1 frame length) for satellites 13

Retransmission Options non-persistent CSMA Give up, or send after some random delay Problem: may incur larger delay when channel is idle 1-persistent CSMA Send as soon as channel is idle Problem: blocked senders all try to send at once P-persistent CSMA If idle, send packet with probability p; repeat Make sure (p * n) < 1 CSE 123 Lecture 6: Media Access Control 14

Jamming Even with CSMA there can still be collisions. Why? If nodes can detect collisions, abort! (CSMA/CD) A Time for B to detect A s transmission X collision (wire) Requires a minimum frame size ( acquiring the medium ) B must continue sending ( jam ) until A detects collision B Requires a full duplex channel Aside: wireless is typically half duplex; need an alternative for wireless channels (we ll return to this) 15

Collision Detection How can A know that a collision has taken place? Worst case:» Latency between nodes A & B is d» A sends a message at time t and B sends a message at t + d epsilon (i.e., just before receiving A s message) B knows there is a collision, but not A B must keep transmitting so A knows that its packet has collided How long? 2 * d (keep talking until you know everyone has heard it) IEEE 802.3 Ethernet specifies max value of 2d to be 51.2us This relates to maximum distance of 2500m between hosts At 10Mbps it takes 0.1us to transmit one bit so 512 bits take 51.2us to send So, Ethernet frames must be at least 64B (512 bits) long» Padding is used if data is too small Transmit jamming signal to insure all hosts see collision 48 bit times sufficient 16

Ethernet First local area network (LAN) Developed in early 70s by Metcalfe and Boggs at PARC Originally 1Mbps, now supports 10Mbps, 100Mbps, 1Gbps and 10Gbps flavors (40/100G in development) Currently the dominant LAN technology Becoming the dominant WAN technology 17

Classic Ethernet IEEE 802.3 standard wired LAN (modified 1-persistent CSMA/CD) Classic Ethernet: 10 Mbps over coaxial cable All nodes share same physical wire Max length 2.5km, max between stations 500m Framing nodes (wire) Preamble, 32-bit CRC, variable length data Unique 48-bit address per host (bcast & multicast addrs too) Preamble (8) Source (6) Dest (6) Len (2) Payload (var) Pad (var) CRC (4) 18

Ethernet improvements Problems with random delay with fixed mean Few senders = unnecessary delay Many senders = unnecessary collisions Binary exponential back-off balances delay w/load First collision: wait 0 or 1 min frame times at random, retry Second time: wait 0, 1, 2, or 3 times Nth time (n<=10): wait 0, 1,, 2 n -1 times Max wait 1023 frames; give up after 16 attempts 19

Capture Effect Randomized access scheme is not fair Suppose stations A and B always have data to send They will collide at some time Both pick random number of slots (0, 1) to wait Suppose A wins and sends Next time the collide, B s chance of winning is halved» B will select from 0,1,2,3 due to exponential back-off A keeps winning: said to have captured the channel 20

Ethernet Performance Much better than Aloha or CSMA in practice Source of protocol inefficiency: collisions More efficient to send larger frames» Acquire the medium and send lots of data» Less time on arbitration (figuring out who gets to send) Less efficient if» More hosts more collisions needed to identify single sender» Smaller packet sizes more frequent arbitration» Longer links collisions take longer to observe, more wasted bandwidth 21

Contention-free Protocols Problem with channel partitioning Inefficient at low load (idle subchannels) Problem with contention-based protocols Inefficient at high load (collisions) Contention-free protocols Try to do both by explicitly taking turns Can potentially also offer guaranteed bandwidth, latency, etc.

Two contention-free approaches Polling Master node invites slave nodes to transmit in turn Request to Send (RTS), Clear to Send (CTS) messages Problems: Polling overhead Latency Single point of failure (master) Token Passing Control token passed from one node to next sequentially. Point-to-point links can be fast Problems: Token overhead Latency Single point of failure (token)

Token Ring (802.5) Token rotates permission to send around ring of nodes Sender injects packet into ring and removes later D C A B nodes Maximum token holding time (THT) bounds access time Early or delayed token release Direction of transmission Round robin service, acknowledgments and priorities Monitor nodes ensure health of ring (alerts on failures) SD (1) AC (1) FC (1) Destination Source Address (6) Address (6) Data Checksum (4) ED (1) FS (1)

FDDI (Fiber Distributed Data Interface) Roughly a large, fast token ring 100 Mbps and 200km vs 4/16 Mbps and local Dual counter-rotating rings for redundancy Complex token holding policies for voice etc. traffic Token ring advantages No contention, bounded access delay Support fair, reserved, priority access Disadvantages Complexity, reliability, scalability Break!

Why Did Ethernet Win? Failure modes Token rings network unusable Ethernet single node detached Good performance in common case Completely distributed, easy to maintain/administer Easy incremental deployment Volume lower cost higher volume. 26

Wireless Media Access Wireless is more complicated than wired Cannot detect collisions Transmitter swamps co-located receiver Collision avoidance Different transmitters have different coverage areas Asymmetries lead to hidden/exposed terminal problems» Just because A is talking to B, doesn t mean that C can t talk to D» A is aware of B and B is aware of C, but A and C are unaware of each other (they are hidden nodes). Both will send to B and frames will collide at B without A or C realizing Also can use contention-free protocols (RTS/CTS)

Hidden Terminals A B C transmit range A and C can both send to B but can t hear each other A is a hidden terminal for C and vice versa Packets will collide at B and create interference CSMA will be ineffective want to sense at receiver

Exposed Terminals A B C D transmit range B, C can hear each other but can safely send to A, D B and C won t transmit, when they should

CSMA with Collision Avoidance (CSMA/CA) Since we can t detect collisions, we try to avoid them When medium busy, choose random interval (contention window) Wait for that many idle timeslots to pass before sending Remember p-persistence a refinement When a collision is inferred, retransmit with binary exponential backoff (like Ethernet) Use ACK from receiver to infer no collision Again, exponential backoff helps us adapt p as needed CSMA/CA vs. CSMA/CD In CSMA/CA, backoff before collision In CSMA/CD, backoff after collision

RTS / CTS Protocols (MACA) A RTS B C D CTS Overcome exposed/hidden terminal problems with contention-free protocol 1. B stimulates C with Request To Send (RTS) packet 2. A hears RTS and defers to allow the CTS 3. C replies to B with Clear To Send (CTS) 4. D hears CTS and defers to allow the data 5. B sends to C

IEEE 802.11 Wireless LAN 802.11b 2.4-5 GHz unlicensed radio spectrum up to 11 Mbps direct sequence spread spectrum (DSSS) in physical layer» All hosts use same code Widely deployed, using base stations 802.11a 5-6 GHz range up to 54 Mbps 802.11g 2.4-5 GHz range up to 54 Mbps All use CSMA/CA for multiple access Optional RTS/CTS All have base-station and ad-hoc network versions

IEEE 802.11 Wireless LAN Wireless host communicates with a base station Base station = access point (AP) Basic Service Set (BSS) (a.k.a. cell ) contains: Wireless hosts Access point (AP): base station BSS s combined to form distribution system (DS)

802.11 Twists How to support different speeds on same channel? Physical layer header encoded at lowest bitrate and indicates bitrate of rest of packet Network Allocation Vector (NAV) Each frame contains field that indicates the amount of time that will be used for the communication (channel reservation) All receivers defer transmit for that time Allows for long or multi-frame exchange

Misc issue: Addressing Alternatives On a broadcast channel all nodes receive all packets Addressing determines which packets are kept and which packets are thrown away Packets can be sent to:» Unicast one destination» Multicast group of nodes (e.g. everyone playing WoW )» Broadcast everybody on wire Dynamic addresses (e.g. Appletalk) Pick an address at random Broadcast is anyone using address XX? If yes, repeat Static address (e.g. Ethernet, 802.11, TokenRing, etc)

IEEE addressing (Ethernet, etc) Addresses: 6 bytes (48 bits) Each adapter is given a globally unique address at manufacturing time» Address space is allocated to manufacturers 24 bits identify manufacturer E.g., 0:0:15:* 3com adapter» Frame is received by all adapters on a LAN and dropped if address does not match Special addresses» Broadcast FF:FF:FF:FF:FF:FF is everybody» Range of addresses allocated to multicast Adapter maintains list of multicast groups node is interested in Practical problems: non-unique addresses

Summary Ways to share a channel Subdivide the channel into subchannels Contention-based protocols» Try and retry if it fails Contention-free protocols» Explicit control over who gets to send at each time Particular issues for wireless Hidden/exposed terminal problems Addressing For next time: bridging/switching, read P&D 3-1-3.2, 3.1