Multiple Access Channels

Similar documents
Computer Networks Medium Access Control. Mostafa Salehi Fall 2008

Computer Network Fundamentals Spring Week 3 MAC Layer Andreas Terzis

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

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

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

CSE 461: Multiple Access Networks. This Lecture

Reminder: Datalink Functions Computer Networking. Datalink Architectures

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

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

Chapter 6 Medium Access Control Protocols and Local Area Networks

EE 122: Ethernet and

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

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

The Link Layer and LANs. Chapter 6: Link layer and LANs

ELEC / COMP 177 Fall Some slides from Kurose and Ross, Computer Networking, 5 th Edition

Chapter 12 Multiple Access 12.1

Networking Technologies and Applications

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

Multiple Access Protocols

COMP/ELEC 429/556 Introduction to Computer Networks

Data Link Layer, Part 3 Medium Access Control. Preface

Link Layer: Retransmissions

CSCI-1680 Link Layer Wrap-Up Rodrigo Fonseca

ECEN 5032 Data Networks Medium Access Control Sublayer

Data Link Layer, Part 5. Medium Access Control

Link Layer. (continued)

CSCI-1680 Link Layer Wrap-Up Rodrigo Fonseca

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

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

Data and Computer Communications

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

CS 455/555 Intro to Networks and Communications. Link Layer

CSE 461: Multiple Access. Homework: Chapter 2, problems 1, 8, 12, 18, 23, 24, 35, 43, 46, and 58

COMP476 Networked Computer Systems. Polling. Sharing the Wire. LAN Technologies. COMP476 Networked Computer Systems 1

Computer Networks. Today. Principles of datalink layer services Multiple access links Adresavimas, ARP LANs Wireless LANs VU MIF CS 1/48 2/48

CSE/EE 461 Section 2

The random access methods we study in this chapter have evolved from a very interesting protocol known as ALOHA, which used a very simple procedure

Protocols for Multiaccess Networks

Medium Access Control

Multiple Access Links and Protocols

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

Chapter 5 Link Layer and LANs

Local Area Networks (LANs) SMU CSE 5344 /

CSCI-1680 Link Layer Wrap-Up Rodrigo Fonseca

Computer and Network Security

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

Link Layer and Ethernet

ECE 4450:427/527 - Computer Networks Spring 2017

CSE/EE 461 Wireless and Contention-Free Protocols

Medium Access Protocols

Chapter 8 LAN Topologies

Link Layer and LANs 안상현서울시립대학교컴퓨터 통계학과.

CMPE 150/L : Introduction to Computer Networks. Chen Qian Computer Engineering UCSC Baskin Engineering Lecture 16

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

CS 3640: Introduction to Networks and Their Applications

Computer Networking Lecture 5 Data link Layer Access Control. Based on slides by Peter Steenkiste Copyright, Carnegie Mellon

Redes de Computadores. Medium Access Control

Link Layer and Ethernet

Links Reading: Chapter 2. Goals of Todayʼs Lecture. Message, Segment, Packet, and Frame

CSCI-1680 Link Layer Wrap-Up Rodrigo Fonseca

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

CSE 461: Wireless Networks

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

CIS 551 / TCOM 401 Computer and Network Security. Spring 2007 Lecture 7

Data Link Layer: Multi Access Protocols

Summary of MAC protocols

CSE 461 Multiple Access. David Wetherall

Part3. Local Area Networks (LAN)

Introduction to Networks and the Internet

Goal and Outline. Computer Networking. What Do We Need? Today s Story Lecture 3: Packet Switched Networks Peter Steenkiste

MULTIPLE ACCESS PROTOCOLS 2. 1

Lecture 6 The Data Link Layer. Antonio Cianfrani DIET Department Networking Group netlab.uniroma1.it

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

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

LAN. CS 4/55231 Internet Engineering. Kent State University Dept. of Computer Science

Computer Networks. Medium Access Sublayer (Part I)

ICE 1332/0715 Mobile Computing (Summer, 2008)

Medium Access Control

Introduction to Computer Networks. IEEE Ethernet

CSC 4900 Computer Networks: The Link Layer

The Medium Access Control Sublayer

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

Lecture 4b. Local Area Networks and Bridges

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

LAN PROTOCOLS. Beulah A AP/CSE

ECSE-4670: Computer Communication Networks (CCN) Informal Quiz 3

Data Link Layer -2- Network Access

CARRIER SENSE MULTIPLE ACCESS (CSMA):

Contention Protocols and Networks

Medium Access Control Sublayer Chapter 4

Chapter 5: Link layer

Access Technologies! Fabio Martignon

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

Internet Architecture and Protocol

Medium Access Control Sublayer

Links. CS125 - mylinks 1 1/22/14

Data Link Layer: Overview, operations

Chapter 5 Link Layer and LANs

Lecture 5 The Data Link Layer. Antonio Cianfrani DIET Department Networking Group netlab.uniroma1.it

Content. Deterministic Access Polling(1) Master-Slave principles: Introduction Layer 2: Media Access Control

Transcription:

Multiple Access Channels Some Queuing Theory MAC: Aloha, ethernet Exponential backoff & friends LANs: Local Area Networks Goal: extend benefits of simple connection as far as possible Means: Share medium between more than two endpoints Problem: how to access the medium? We ll look at a few approaches... 1 2 Alternative 1: Static Allocation Little s Theorem: Setting Approach: Divide the channel into n logical channels, let each node its own channel Use time, space or frequency division Time (TDMA): user i get time slot j iff j i (mod n) Space: each user has his own send line Frequency (FDMA): divide frequency bandwidth How good is it? We ll use Queuing Theory to study average waiting times. customer serial number i delay of customer i arrival process N(t) t departure process time 3 4

Little s Theorem: Statement The M/M/1 Queuing Model Let N: average # customers in system λ: average arrival rate (in customers/time unit) T: average delay in the system (in time units). Then N = λ T; alternatively: T = N/λ. Example: On average, people arrive 1/minute to the supermarket; there are 50 people in the supermarket. How much time, on average, does each one spend in the supermarket? 5 System state number of customers Arrivals and departures are stochastic (prob.) arrivals are Poisson process with rate λ (expcted interarrival time: 1/λ) service time is distributed exponentially with rate μ (average service time 1/μ). Markov Chain: take a time window of length δ 0 + 1 0 1 1 2 1 3 1 4 1 6 M/M/1 Steady State: state probabilities in the limit Def: In steady state: 0 net flow across each cut Therefore since also, we get M/M/1 Average Queue Length Let ( utilization factor ) We saw that 0, and that 0. So expected number of customers is 0 1 2 3 4 1 1 1 1 1 7 8

M/M/1 Average Waiting Time Finally, we apply Little s theorem and find the expected delay: Summary: In the M/M/1 model, where average arrival rate is λ pkts/sec, and average service rate is μ pkts/sec, 1 the average packet waiting time is μ λ seconds Back to multiple access channels: Static Allocation latency Consider a channel with average arrival rate λ and average service rate μ If we divide the channel into n small channels, then for each small channel: The arrival rate is λ/n The service rate is μ/n So the average waiting time is 1 n = μ/n λ/n μ λ 9 10 Implication of QT result M/M/1 is a simplistic model, but if it s roughly correct, then... Even if splitting the channel is free (no overhead), the latency grows linearly with the splitting factor! Conclusion: Don t statically split the channel, share it How? Medium Access Control (MAC) Protocols Goal: arbitrate access to a common shared channel among a population of users Desired properties: Efficient Low delay, high utilization Fair Fault tolerant (distributed!) Example: bus arbiter in a computer What s wrong with that solution? 11 12

Alternative 2: Go wild ALOHA Whenever you want to send, send May have collisions! must verify that message was received use error-detection code receiver sends acknowledgment if all is fine sender waits for ACK (RTT) If no ACK: Wait some time and resend Abort if too many failures. Aloha Protocol (U.Hawaii, 70) Central Node f 0 f 1 Host 1 Host 2 Host 3 Basic operation: 1. All hosts transmit on f 0 receive on f 1 2. Central node repeats on f 1 whatever it receives on f 0 Collision detected by senders: receive corrupted data no need for ACK 13 14 Aloha Protocol + Simple + Robust against failure of a host. + Distributed. + Low load => low delay. High load => many collisions => low utilization, high delay Analysis of ALOHA Assume transmitting a frame takes one unit of time Focus on a collision. Which transmissions may collide with a transmission that starts at time t? t-1 t t+1 15 16

Analysis of ALOHA (cont.) Analysis of ALOHA (cont.) Suppose there are stations, and the probability that a station starts transmitting in a time unit is. Then: The probability that exactly one node transmits in a time unit is Utilization = fraction of time used for successful transmissions Here, the same as Pr[time unit successful] Want to maximize utilization: Differentiate wrt Get maximum at # choices of who transmits Prob. it transmits in the time unit Prob. all others are silent for 2 units 17 And then utilization is about Ouch!. 18 Simple & effective improvement: slotted ALOHA Next step: CSMA/CD Why be vulnerable for 2 time units? Synchronize, and use slotted time: May transmit only at integer times Utilization formula now becomes Max at utilization then is Not that bad. Hard to synchronize clocks Assume link allows listening while transmitting Simple with wires, not with radio Protocol: listen always; wait for silence to transmit; abort on collision Carrier Sense Multiple Access / Collision Detection 19 20

CSMA/CD Size Restriction A t=0 t=2(prop-ε) PROP t=prop-ε Requirement: detect a collision before finishing the transmission. Must have: minimum packet length 2 PROP B t=prop Collisions in CSMA/CD Analysis similar to slotted ALOHA, if all transmissions are at least 2 prop time units. Best utilization: when probability of transmission is Best utilization is then Therefore: when transmissions collide, let each transmit with probability Each waits time units, random in 21 22 Need 1/n, but what s n? When transmitting on a CSMA/CD channel, can know if the number of transmitters is More than 1: collision Less than 1: silence Exactly 1: success Define abstract problem: Find the value of an unknown on integer n using comparison queries only given value a, answers are only >, <, = Finding If we had an upper bound on : Use binary search: queries Need to have How to find such an upper bound? Use repeated doubling: guess 1,2,4,8 Get a bound At most queries to find In CSMA/CD: use guess of How much expected time until success? 23 24

802.3 CSMA/CD Algorithm ready to send attempts=0 sense channel free busy attempts++ wait MAX_DELAY * random [0, 2 attempts -1] collision detected transmit and sense Carrier Sense no collision Collision Detection Exponential Backoff transmit jamming signal (32 bit) done/ ready to send What if link is overloaded? Congestion collapse, network meltdown : When offered traffic increases beyond max point (1/e 37%), then total throughput decreases! Retransmissions make things much worse 25 26 The Original Ethernet The Original Ethernet 10Mb/s Repeaters every 500m PROP max Packetsize l < 1500 m = l / c = 1500 / 2.5 10 = 6μs ( 12μs) 10Mb / s = 120bits 8 Thick copper coaxial cable Eventually, minimum packet size is 64 bytes = 512 bits. Original picture drawn by Bob Metcalfe, inventor of Ethernet (1972 Xerox PARC) 27 28

Ethernet Frame Format 10Base-T Twisted pair Ethernet Bytes: 7 1 6 6 2 0-1500 0-46 4 Repeater Hub Preamble SFD DA SA Type Data Pad CRC 100m max cable length Preamble: synchronize clocks (7 x 10101010) Start of Frame Delimiter: 10101011 Destination Address: 48-bit globally unique address assigned by manufacturer. Type: Indicates protocol of inside layer (IP = 0x0800) Pad: Zeroes used to ensure minimum frame length of 64B Cyclic Redundancy Check: check sequence to detect bit errors. Router Runs over twisted pair telephone wire ( cat-3 ). Centralized management ( managed hubs ): better reliability. Extremely successful 29 30 Faster Ethernets Problem: must keep minimal packet size. With fixed cable length and propagation speed, must increase minimal size proportionally to bandwidth increase! E.g. 100Mb/s, 1500m of cable: prop remains 6μs, minimal size becomes 1200 bits. Solutions: Cable length limited to 100m. Avoid collisions by Ethernet Switches (later). 100Mb/s Ethernet Standard Fast Ethernet Ethernet MAC Protocol 100Base-T4 100Base-TX 100Base-FX Up to 100m of cable per segment. 100Base-T4: Uses four pairs of Category-3 cable. 100Base-TX: Uses two pairs of Category-5 cable. 100Base-FX: Uses two optical fibers. 31 32

Gigabit Ethernet (1GigE) Over fiber (1000Base-X) or twisted pair (1000Base-T) Original copper implementations up to 25 meters, 1000BaseT today up to 100m Fiber: 500m 5km Encoding more sophisticated Today: 10-gigabit Ethernet! Switching and full-duplex only Wireless LANs: CSMA/CA Radio xmit/recv power ratio is huge -> Can t detect collision Many bit errors Consequences: Use explicit acks Try to avoid collisions CSMA/CA Algorithm: Wait until silence Set timer to random [1, CW] Pause timer while another station transmits On timeout, send packet and wait for ack If no ack: CW 2CW, try again 33 34 The problems of asymmetry Hidden terminal CSMA/CA doesn t work when not all stations can receive transmissions from all stations Hidden terminal some stations in an area cannot hear transmissions from others, though base can hear both collision because carrier not detected Exposed terminal some (but not all) stations can hear transmissions from stations not in the local area idle station because carrier incorrectly detected B can hear both A and C A and C can t hear each other When A transmits to B, C may interfere Notation: A-->B means that B can hear A. A<-->B<-->C doesn t imply A<-->C Hidden terminal: A-->B, C-->B, A<-/->C A collision B C 35 36

Exposed terminal The problems summarized Assumption: B -/-> C, but A-->C ; D -/-> A Result: When C transmits to D, A does not transmit to B even though it could! Exposed terminal: A-->B, C-/->B does not mean C-/-> A. H is hidden from A B A C D E is exposed to A E A B H blocked 37 38 Dealing with hidden and exposed terminals Multiple Access Collision Avoidance (MACA) Busy Tone Multiple Access (BTMA) uses a separate busy-tone channel when X is receiving a message, X transmits on BT channel everyone who might want to talk to X knows that X is busy even if they cannot hear transmission to X this avoids both problems (why?) BTMA requires us to split frequency band more complex receivers (need two tuners) If bands may have different propagation characteristics -> scheme fails! 39 Optional in 802.11 Sender transmits RequestToSend (RTS) frame Receiver replies with ClearToSend (CTS) frame Neighbors see CTS: keep quiet see RTS but not CTS: ok to transmit Receiver sends ACK when has frame neighbors silent until see ACK Collisions no collisions detection known when don t receive CTS exponential backoff 40

Token rings: another broadcast LAN Token Rings Common Features Developed by IBM, standardized in 802.5 Protocols are deterministic, more capabilities than ethernet But not completely symmetric l 4 l 1 Data Token/header Original speeds 4Mbps, 16 Mbps, FDDI is 100Mbps 250 hosts limit per network Listen: l 3 l 2 Talk: 41 42 Usually ring inside a box Token Rings Basic operation multistation access unit Relay closes when station s nonexistent 43 Token is a special message, rotating in ring like a locomotive, one way When adapter (NIC) has data to send: Wait for token, changes it into header, appends message (like a train) When adapter gets header with data: looks at destination address, copies data if addressee. then continue circulating with some bits raised at the trailer ( ack at the datalink layer!) Origin drains its packet off the ring, recreates token and sends it. 44

Token Rings Advanced operation Nodes may send more than one message per token. impose maximal token holding time THT (10ms) Support for priority, reservation Monitor in charge of keeping order: Injects new token if token dies Marks each message and removes it if arrives again Throws away corrupted messages Monitor announces existence periodically; if times out--leader Election protocol. FDDI: Fiber Distributed Data Interface Two rings: one for backup 100 Mbps Runs on optical fibers and twisted pairs Up to 500 nodes Total length at most 200 km round trip 100 Km cable 45 46