Download presentation
Presentation is loading. Please wait.
Published byCarol Morgan Modified over 7 years ago
1
CS434/534: Topics in Networked (Networking) Systems Wireless Foundation: Wireless MAC; MAC; New Designs Yang (Richard) Yang Computer Science Department Yale University 208A Watson
2
Admin. PS2 questions Please make appointments with me to discuss potential projects
3
Recap: Wireless PHY
4
Recap: Link Layer Services
Framing separate bits into frames; each frame has header, trailer and error detection/correction Multiplexing/demultiplexing use frame headers to identify src, dest Media access control implement sharing of wireless resources Reliable delivery between adjacent nodes seldom used on low bit error link (fiber, some twisted pair) common for wireless links: high error rates
5
Recap: MAC Protocols Taxonomy
Channel partitioning SDMA, TDMA, FDMA and CDMA are basic media partitioning techniques divide media into smaller “pieces” (space, time slots, frequencies, codes) for multiple transmissions to share Non-channel partitioning random access “taking-turns”
6
Recap: Aloha Protocol as a Random Access Protocol
call setup from an MS MS BTS RACH (request signaling channel) Slotted Aloha AGCH (assign signaling channel) SDCCH (request call setup) SDCCH message exchange A SDCCH (assign TCH) Communication B
7
Recap: Slotted Aloha Advantages
Simple, decentralized random access protocol Issues Low efficiency Only ~37% at optimal transmission rate Even lower efficiency at non-optimal (fixed p) No rate allocation/fairness
8
Recap: Ethernet Fix for Efficiency
Introduce carrier sense (CS): do not interrupt others Introduce collision detection (CD): instead of wasting the whole frame transmission time (a slot), we waste only the time needed to detect collision. Introduce adaptive probability using exponential backoff (EB): reduce probability #collisions increases If more collisions => p is high => should reduce p P P: packet size, C: contention window C
9
Q: Does Ethernet alg work well in wireless?
Ethernet Fix: Carrier-Sense Multiple Access /Collision Detection/Exponential Backoff Carrier sense The Ethernet algorithm get a frame from upper layer; K := 0; n := 0; // K: control wait time; n: no. of collisions repeat: wait for K * 512 bit-time; while (network busy) wait; wait for 96 bit-time after detecting no signal; transmit and detect collision; if detect collision stop and transmit a 48-bit jam signal; n ++; m:= min(n, 10), where n is the number of collisions choose K randomly from {0, 1, 2, …, 2m-1}. if n < 16 goto repeat else give up else declare success Detect Collision Exponential backup Q: Does Ethernet alg work well in wireless?
10
Outline Recap Wireless background Wireless MAC design Frequency domain
Modulation and demodulation Wireless channels Wireless PHY design Wireless MAC design wireless access problem and taxonomy wireless resource partitioning dimensions media access protocols ALOHA protocol The Ethernet protocol Hidden terminals in wireless
11
The Hidden Terminal Problem
C A is sending to B, but C cannot detect the transmission Therefore C sends to B In summary, A is “hidden” from C
12
CSMA/CD + Hidden Terminals
get a frame from upper layer; K := 0; n := 0; // K: control wait time; n: no. of collisions repeat: wait for K * 512 bit-time; while (network busy) wait; wait for 96 bit-time after detecting no signal; transmit and detect collision; if detect collision stop and transmit a 48-bit jam signal; n ++; m:= min(n, 10), where n is the number of collisions choose K randomly from {0, 1, 2, …, 2m-1}. if n < 16 goto repeat else give up else declare success Hidden terminals => 0 goodput! Q: what is the outcome of CSMA/CD + hidden terminals, assume two senders with infinite backlog?
13
Hidden Terminals Why cannot senders C and A detect collisions or potential collisions? Collision is spatially dependent C/A is at a different location than B Only receiver can detect a collision happened or potential collisions A B C
14
Roadmap: Wireless MAC Problem: single shared medium, hence if two transmissions overlap on all dimensions [time, space, frequency, and code], then it is a collision +CS+CD+EB Slotted ALOHA Ethernet Hidden-terminal Collision detection/ prevention ?
15
Solution I: Receiver Notifies Collision Happened
Solution: receiver sends ACK to sender to indicate a collision happened or not If no ACK from receiver, sender assumes a collision
16
Solution II: Receiver Signals Potential Collision
Receiver sends busy-tone Used in CDPD (cellular digital packet data) The base station sends a busy tone on the down link when receiving data
17
Short signaling packets (virtual carrier sense)
Solution III: Receiver Signals Potential Collision Using Virtual Carrier Sense/ACK Short signaling packets (virtual carrier sense) Sender: RTS (request to send) Receiver: CTS (clear to send) contain sender address, receiver address, transmission duration, called network allocation vector (NAV) A node keeps quiet for NAV in CTS DATA RTS A B C D CTS
18
Comparisons: Media Access Techniques Handling Hidden Terminals
Slotted Aloha very simple to implement but low efficiency CSMA/CD (Ethernet alg.) hidden terminals can cause 0 goodput CSMA/CD + ACK simple to implement low efficiency (CD is not effective)
19
Comparisons: Media Access Techniques Handling Hidden Terminals
Busy tone simple to implement but need a channel for busy signal Virtual carrier sensing (RTS/CTS) higher efficiency when a collision occurs (not waste the whole duration) But energy consumption can be high because a node needs to monitor the environment all the time Idle:receive:send: 1:1.05:1.4 [Stemm and Katz]; Digitan 2 Mbps WLAN 1:2:2.5 many measurements show that overhead hurts performance
20
Outline Recap Wireless background Wireless MAC design Frequency domain
Modulation and demodulation Wireless channels Wireless PHY design Wireless MAC design wireless access problem and taxonomy wireless resource partitioning dimensions media access protocols ALOHA protocol The Ethernet protocol Hidden terminals in wireless IEEE
21
IEEE (Requirements) Design for small coverage (e.g. office, home) Use un-licensed spectrum High data-rate applications Ability to integrate real time applications and non-real-time applications (implications?)
22
802.11: Infrastructure Mode Components 802.11 LAN
networks station (STA) terminal with access mechanisms to the wireless medium and radio contact to the access point access point (AP) station integrated into the wireless LAN and the distribution system basic service set (BSS) group of stations using the same AP portal bridge to other (wired) networks distribution system interconnection network to form one logical network (EES: Extended Service Set) based on several BSS 802.x LAN STA1 BSS1 Portal Access Point Distribution System Access Point ESS BSS2 STA2 STA3 LAN 9
23
The IEEE 802.11 Family Protocol Release Data Freq. Rate (max)
Modulation Range (indoor) Legacy 1997 2.4 GHz 2Mbps DSSS/FHSS ~20 m 802.11a 1999 5 GHz 54 Mbps OFDM ~35 m 802.11b 11 Mbps DSSS ~38 m 802.11g 2003 OFDM/DSSS 802.11n 2009 2.4/5 GHz 540 Mbps ~70 m
24
Long preamble & header (192 usec; or optional 96 short version)
802.11b PHY Format Long preamble & header (192 usec; or optional 96 short version) Preamble & header always transmitted at 1Mbps DBPSK Preamble - Sync: alternating 0s and 1s (DSSS 128 bits) - SFD: Start Frame delimiter: PLCH (Phsical Layer Convergence Procedure) Header - SIGNAL: the rate info - SERVICE: mostly future use - payload length - CRC: 16 bit protection of header
25
802.11 – MAC Format Types Sequence numbers Addresses Miscellaneous
bytes 2 2 6 6 6 2 6 0-2312 4 Frame Control Duration/ ID Address 1 Address 2 Address 3 Sequence number Address 4 Data CRC bits 2 2 4 1 1 1 1 1 1 1 1 Protocol version Type Subtype To DS From DS More Frag Retry Power Mgmt More Data WEP Order Types control frames, management frames, data frames Sequence numbers important against duplicated frames due to lost ACKs Addresses receiver, transmitter (physical), BSS identifier, sender (logical) Miscellaneous sending time, checksum, frame control, data
27
802.11 – MAC Asynchronous Data Service (ADS)
Objective: exchange data based on distributed random access Approach: Implement ADS using distributed coordinate function (DCF): DCF CSMA/CA (mandatory) - collision avoidance via randomized “back-off“ ACK packet for acknowledgements/detection DCF w/ RTS/CTS (optional) additional virtual “carrier sensing Time-Bounded Service (TBS) Objective: Exchange data with bounded delay service Approach: implemented TBS using point (access point) coordinated function (PCF)
28
802.11 ADS/DCF: CSMA/CA CSMA: Listen before transmit
Collision avoidance when transmitting a packet, choose a backoff interval in the range [0, CW] CW is contention window Count down the backoff interval when medium is idle count-down is suspended if medium becomes busy Transmit when backoff interval reaches 0
29
802.11 ADS/DCF: CSMA/CA Example
busy B1 = 25 B2 = 20 B1 = 5 data wait data wait B2 = 10 B2 = 15 busy B1 and B2 are backoff intervals at nodes 1 and 2 cw = 31
30
802.11 ADS/DCF: CSMA/CA Backoff
IEEE contention window CW is adapted dynamically depending on collision occurrence after each collision, CW is doubled thus CW varies from CWmin to CWmax 802.11b 802.11a 802.11g aSlotTime 20 usec 9 usec 20 usec (mixed); 9 usec (g-only) aCWmin 31 slots 15 slots
31
ADS/DCF: RTS/CTS + ACK Sender sends RTS with NAV (Network allocation Vector, i.e. reservation parameter that determines amount of time the data packet needs the medium) Receiver acknowledges via CTS (if ready to receive) CTS reserves channel for sender, notifying possibly hidden stations Sender can now send data at once, acknowledgement via ACK Other stations store NAV distributed via RTS and CTS RTS data sender CTS ACK receiver NAV (RTS) data other stations NAV (CTS) t defer access new contention
32
802.11 TBS/PCF: Polling (Infrastructure Mode)
point coordinator U polled wireless stations NAV NAV contention free period t medium busy contention period D: downstream poll, or data from point coordinator U: data from polled wireless station
33
direct access if medium is free DIFS
Integrating PCF and DCF Using different inter frame spacing values to implement priority SIFS (Short Inter Frame Spacing) highest priority, for ACK, CTS, polling response PIFS (PCF IFS) medium priority, for time-bounded service using PCF DIFS (DCF, Distributed Coordination Function IFS) lowest priority, for asynchronous data service t medium busy SIFS PIFS DIFS next frame contention direct access if medium is free DIFS
34
802.11 – Inter Frame Spacing 802.11b 802.11a 802.11g aSIFSTime 10 usec
aSlotTime 20 usec 9 usec 20 usec (mixed); 9 usec (g only) aDIFTime (2xSlot+SIFS) 50 usec 34 usec 50 usec; 28 usec
35
Example: RTS-CTS-data-ACK
DIFS RTS data sender SIFS SIFS CTS SIFS ACK receiver NAV (RTS) DIFS data other stations NAV (CTS) t defer access new contention
36
Example: PIFS D: downstream poll, or data from point coordinator
SIFS D D point coordinator SIFS U polled wireless stations NAV NAV contention free period t medium busy contention period D: downstream poll, or data from point coordinator U: data from polled wireless station
37
Outline Recap Wireless background Wireless MAC design Frequency domain
Modulation and demodulation Wireless channels Wireless PHY design Wireless MAC design wireless access problem and taxonomy wireless resource partitioning dimensions media access protocols ALOHA protocol The Ethernet protocol Hidden terminals in wireless IEEE Design Timing example
38
Example: 802.11b/ACK Timing Analysis
Suppose TCP with 1460 bytes data payload TCP data frame size (not including preamble) 1536 bytes ( TCP/IP header header) TCP ACK data frame size (not including preamble) 76 TCP/IP header bytes 802.11b ACK frame size 14 bytes Suppose b at the highest rate 8 bits per symbol 1.375 Msps See page 4
39
802.11b/ACK Timing (1460B data) TCP Data TCP Ack
40
802.11b/ACK Timing (1460B data) TCP Data TCP Ack DIFS (us) 50
41
802.11b/ACK Timing (1460B data) TCP Data TCP Ack DIFS (us) 50
Data (us) / = 1,310 / = 248
42
802.11b/ACK Timing (1460B data) TCP Data TCP Ack DIFS (us) 50
Data (us) / = 1,310 / = 248 SIFS (us) 10
43
802.11b/ACK Timing (1460B data) TCP Data TCP Ack DIFS (us) 50
Data (us) / = 1,310 / = 248 SIFS (us) 10 ACK (us) / =203 203
44
802.11b/ACK Timing (1460B data) TCP Data TCP Ack DIFS (us) 50
Data (us) / = 1,310 / = 248 SIFS (us) 10 ACK (us) / =203 203 Frame total (us) 1,573 511 Transactions total (us) 2,084
45
Example: g/ACK Timing Suppose g at the highest rate (54Mbps) symbol duration: 4 usec; 216 bits/symbol 20 usec preamble; 6 usec “signal extension time” at the end of each frame Data: 28 (DIFS) + ( * 4 + 6) + 10 (SIFS) + ( * 4 + 6) = 322 Ack: 106
46
Example: g/ACK Timing Suppose g at the highest rate (54Mbps) symbol duration: 4 usec; 216 bits/symbol 20 usec preamble; 6 usec “signal extension time” at the end of each frame Suppose TCP with 1460 bytes data payload data: 57 (=1536*8/216) symbols; ACK: 3 (=76*8/216) symbols 802.11b ACK frame size 14 bytes 1 symbol Data: 28 (DIFS) + ( * 4 + 6) + 10 (SIFS) + ( * 4 + 6) = 322 Ack: 106
47
802.11g Basic Timing (1460B data) TCP Data TCP Ack DIFS (us) 28
Data (us) *4 + 6 = 254 * = 38 SIFS (us) 10 ACK (us) * =30 30 Frame total (us) 322 106 Transactions total (us) 428
48
Example: g + CTS RTS/CTS uses b DIFS (50 usec) and long preamble (192 usec) RTS/CTS uses b frame coding 20 bytes RTS 14 bytes CTS
49
802.11g + CTS Timing (1460B data) TCP Data TCP Ack DIFS (us)
28 -> 50 CTS /1.375 = 203 = 203 SIFS 10 Data (us) *4 + 6 = 254 * = 38 SIFS (us) ACK (us) * =30 30 Frame total (us) 322 106 Transactions total (us) 428 -> 898
50
Summary Technology Transactions per sec Mbps of TCP
Relative to b 11b, 11Mbps 479 5.6 1 11a, 54 Mbps 2,336 27.3 4.9 11g, no CTS/RTS 11g, CTS 1,113 13.0 2.3 11g, RTS/CTS 750 8.8 1.6
51
Outline Recap Wireless background Wireless MAC design Frequency domain
Modulation and demodulation Wireless channels Wireless PHY design Wireless MAC design wireless access problem and taxonomy wireless resource partitioning dimensions media access protocols ALOHA protocol The Ethernet protocol Hidden terminals in wireless IEEE New designs
52
Roadmap: Wireless MAC Problem: single shared medium, hence if two transmissions overlap on all dimensions [time, space, frequency, and code], then it is a collision +CS+CD+EB Slotted ALOHA Ethernet Hidden-terminal Collision detection/ prevention ACK/RTS-CTS Contrarian design
53
Hidden Terminal with No ACK Collision! Alice Bob
54
Hidden Terminal with 802.11 Retransmission One more Collision Alice
Bob The problem does not stop here. Alice and Bob retransmit their packets after increasing their contention window. But this does not help. Their transmissions still overlap causing more collisions. Alice and Bob will continue increasing their contention window and retransmitting, until after many trials they get a packet through or they time out.
55
802.11 Setting: Two Collisions of Two Packets
Pb
56
Interference-free Bits
ZigZag Decoding Exploits ’s behavior Retransmissions Same packets collide again Senders use random jitters Collisions start with interference-free bits Pa Pa ………… How do we leverage these interference free bits to decode the collisions? ∆1 Pb ∆2 Pb Interference-free Bits
57
ZigZag Algorithm ∆1 ≠∆2 ∆1 ∆2 1 1
while (exists a chunk that is interference-free in one collision and has interference in the other) { decode and subtract from the other collision }
58
How Does ZigZag Work? ∆1 ≠∆2 ∆1 ∆2 1 1 2
while (exists a chunk that is interference-free in one collision and has interference in the other) { decode and subtract from the other collision }
59
How Does ZigZag Work? ∆1 ≠∆2 ∆1 ∆2 1 3 2 2
while (exists a chunk that is interference-free in one collision and has interference in the other) { decode and subtract from the other collision }
60
How Does ZigZag Work? ∆1 ≠∆2 ∆1 ∆2 1 3 3 2 4
while (exists a chunk that is interference-free in one collision and has interference in the other) { decode and subtract from the other collision }
61
How Does ZigZag Work? ∆1 ≠∆2 ∆1 ∆2 1 3 5 4 2 4
while (exists a chunk that is interference-free in one collision and has interference in the other) { decode and subtract from the other collision }
62
How Does ZigZag Work? ∆1 ≠∆2 ∆1 ∆2 1 3 5 5 2 4 6
while (exists a chunk that is interference-free in one collision and has interference in the other) { decode and subtract from the other collision }
63
How Does ZigZag Work? ∆1 ≠∆2 ∆1 ∆2 1 3 5 7 6 2 4 6
while (exists a chunk that is interference-free in one collision and has interference in the other) { decode and subtract from the other collision }
64
How Does ZigZag Work? ∆1 ≠∆2 ∆1 ∆2 1 3 5 7 7 2 4 6 8
while (exists a chunk that is interference-free in one collision and has interference in the other) { decode and subtract from the other collision } Thus, even in the face of collisions, we are able to correctly receive 2 packets in 2 timeslots. Delivered 2 packets in 2 timeslots As efficient as if the packets did not collide
Similar presentations
© 2025 SlidePlayer.com. Inc.
All rights reserved.