Presentation is loading. Please wait.

Presentation is loading. Please wait.

Media Access Control and

Similar presentations


Presentation on theme: "Media Access Control and"— Presentation transcript:

1 Media Access Control and 802.11
Y. Richard Yang 2/7/2011

2 Outline Admin. and recap Media access control

3 Admin. Start to think about project Admin: homework 2 linked online
2-3 students per group Make appointment to talk to me Admin: homework 2 linked online

4 Recap 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

5 WCDMA Orthognal Variable Spreading Factor (OSVF)
Flexible code (spreading factor) allocation up link SF: 4 – 256 down link SF: 1,1,1,1,1,1,1,1 1,1,1,1 ... 1,1,1,1,-1,-1,-1,-1 1,1 1,1,-1,-1,1,1,-1,-1 ... 1,1,-1,-1 X,X 1,1,-1,-1,-1,-1,1,1 1 X 1,-1,1,-1,1,-1,1,-1 X,-X ... No parent-child on the code tree 1,-1,1,-1 1,-1,1,-1,-1,1,-1,1 1,-1 SF=n SF=2n 1,-1,-1,1,1,-1,-1,1 ... 1,-1,-1,1 1,-1,-1,1,-1,1,1,-1 SF=1 SF=2 SF=4 SF=8

6 Recap Media Access Control (MAC) scheduling problem: how does a network allocate space/time/freq/code to maximize resource efficiency to allocate resource fairly to satisfy app requirements Sharing or cellular up links: time sharing the same frequency and code a single receiver (the Access Point) Time sharing techniques fixed allocation centralized authority, e.g., polling taking turns, e.g., token passing distributed random access

7 Success (S), Collision (C), Empty (E) slots
A Recap: Slotted Aloha B Time divided into slots get a frame repeat: at each slot transmit with probability p; until no collision Success (S), Collision (C), Empty (E) slots

8 Slotted Aloha Efficiency
S = throughput = “goodput” (success rate) G = offered load = np 0.5 1.0 1.5 2.0 Slotted Aloha when p n < 1, as p (or n) increases probability of empty slots reduces probability of collision is still low, thus goodput increases when p n > 1, as p (or n) increases, probability of empty slots does not reduce much, but probability of collision increases, thus goodput decreases goodput is optimal when p n = 1

9 Dynamics of Aloha: Effects of Fixed Probability
- assume a total of m stations; - An idle station starts a frame with prob. pa pa << p success rate is the departure rate, the rate the backlog is reducing desirable stable point successful transmission rate at offered load np + (m-n)pa dep. and arrival rate of backlogged stations new arrival rate: (m-n) pa undesirable stable point m n: number of backlogged stations offered load = 1 Lesson: if we fix p, but n varies, we may have an undesirable stable point

10 Pros and Cons of Slotted Aloha
Pros: simple Cons: low efficiency: utilization at ~1/e undesirable stable point

11 Ethernet fix: CSMA/CD w/ Exp Backoff
Given collision detection, instead of wasting the whole packet transmission time (a slot), we waste only the time needed to detect collision. Instead of a fixed probability, adapt probability according to # of collision P: packet size, C: contention window C C C P

12 Does collision detection work well in wireless?
Ethernet Fix: Carrier-Sense Multiple Access /Collision Detection/Exponential Backoff 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 Does collision detection work well in wireless?

13 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

14 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 cause collapse! Q: what is the outcome of CSMA/CD + hidden terminals?

15 Handling Hidden Terminals
Hidden terminals -> collision detection is not reliable -> if do not detect collision, there is still a chance of collision -> transmit with only prob. CSMA/CD -> CSMA/CA/ACK (congestion avoidance) default in even if media is not sensed busy, transmits with a probability in real implementation, with a random delay receiver ACK to make sure collision does not happen

16 Handling Hidden Terminals: Detect
Develop techniques to detect hidden terminals Why cannot C detect potential collision? Collision is spatially dependent C is at a different location than B Only receiver can detect collision, to avoid, B should tell C that it is receiving A B C

17 Hidden-Terminal Detection: Busy-tone
Used in CDPD (cellular digital packet data) The base station sends a busy tone on the down link when receiving data

18 Hidden-Terminal Detection: Virtual Carrier Sense/ACK
Short signaling packets (virtual carrier sense) RTS (request to send) and 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

19 Comparisons: Media Access Techniques Handling Hidden Terminals
Slotted Aloha very simple to implement but need clock sync and low efficiency CSMA/CD (Ethernet alg.) hidden terminal causes collapse CSMA/CA/ACK simple to implement low efficiency

20 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 1997]; Digitan 2 Mbps WLAN 1:2:2.5 many measurements show that overhead hurts performance

21 Outline Admin. and recap MAC in wireless networks 802.11

22 IEEE Requirements Design for small coverage (e.g. office, home) (implication?) Low/no mobility (implications?) High data-rate applications Ability to integrate real time applications and non-real-time applications (implications?) Use un-licensed spectrum

23 802.11: Infrastructure Mode Architecture similar to cellular
LAN Architecture similar to cellular 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

24 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

25 5000 + 5*channel number [MHz]
802.11a Physical Channels 36 40 44 48 52 56 60 64 channel# 5150 5180 5200 5220 5240 5260 5280 5300 5320 5350 [MHz] center frequency = *channel number [MHz] 149 153 157 161 channel# 5725 5745 5765 5785 5805 5825 [MHz]

26 802.11a Modulation Use OFDM to divide each physical channel (20 MHz) into 52 subcarriers (20M/64=312.5 KHz each) 48 data, 4 pilot Adaptive modulation BPSK: 6, 9 Mbps QPSK: 12, 18 Mbps 16-QAM: 24, 36 Mbps 64-QAM: 48, 54 Mbps

27 802.11 - MAC Layer Traffic services
Asynchronous Data Service (mandatory) exchange of data packets based on “best-effort” support of broadcast and multicast Time-Bounded Service (optional) exchange of bounded delay service

28 802.11 MAC Layer: Access Methods
DFWMAC-DCF CSMA/CA (mandatory) collision avoidance via randomized “back-off“ ACK packet for acknowledgements/detection DFWMAC-DCF w/ RTS/CTS (optional) additional virtual “carrier sensing: to avoid hidden terminal problem DFWMAC- PCF (optional) access point polls terminals according to a list

29 802.11 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

30 20 usec (mixed); 9 usec (g-only)
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 Congestion Avoidance: 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

32 – 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 DIFS RTS data sender SIFS SIFS CTS SIFS ACK receiver NAV (RTS) DIFS data other stations NAV (CTS) t defer access new contention

33 direct access if medium is free  DIFS
– Inter Frame Spacing Defined different inter frame spacing SIFS (Short Inter Frame Spacing); 10 us in b highest priority, for ACK, CTS, polling response PIFS (PCF IFS); 30 us in b medium priority, for time-bounded service using PCF DIFS (DCF, Distributed Coordination Function IFS); 50 us in b 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 802.11: PCF for Polling (Infrastructure Mode)
PIFS 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

36 802.11b Frame Format preamble
Sync SFD PLCP header MAC Data CRC Preamble (192 usec; or optional 96 short version) - Sync: alternating 0s and 1s (DSSS 128 bits) - SFD: Start Frame delimiter: PLCH (Phsical Layer Convergence Procedure) Header - payload length - signaling field: the rate info. - CRC: 16 bit protection of header

37 802.11 – MAC Data Format Types Sequence numbers Addresses
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 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

38

39 Example: 802.11b Throughout Suppose TCP with 1460 bytes data payload
TCP data frame size (not including preamble) 1536 bytes ( TCP header header) TCP ACK data frame size (not including preamble) 76 bytes 802.11b ACK frame size 14 bytes Suppose b at the highest rate 8 bits per symbol 1.375 Msps Q: What is TCP/802.11b throughput? See page 4

40 802.11b Throughout TCP Data TCP Ack DIFS (us) 50 802.11 Data (us)
/ = 1,310 / = 248 SIFS (us) 10 ACK (us) / =203 203 Frame total (us) 1,573 511 Transactions total (us) 2,084

41 Example: g Throughout 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 symbols; ACK: 3 symbols 802.11b ACK frame size 14 bytes 1 symbol Data: 28 (DIFS) + ( * 4 + 6) + 10 (SIFS) + ( * 4 + 6) = 322 Ack: 106

42 802.11g Throughout TCP Data TCP Ack DIFS (us) 28 802.11 Data (us)
*4 + 6 = 254 * = 38 SIFS (us) 10 ACK (us) * =30 30 Frame total (us) 322 106 Transactions total (us) 428

43 Example: TCP/802.11g + 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 Q: What is throughput?

44 802.11g + CTS Throughout 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

45 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

46 Outline Admin. and recap 802.11 hidden-terminal revisited

47 The Hidden Terminal Problem
No ACK Collision! Alice Bob

48 The Hidden Terminals Problem
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.


Download ppt "Media Access Control and"

Similar presentations


Ads by Google