170 likes | 327 Views
MAC for WLAN. Doug Young Suh suh@khu.ac.kr Last update : Aug 1, 2009. IEEE802.11 Wireless MAC. MAC Service and functions MAC Addressing Fragmentation Carrier sense mechanisms Channel Access Protocols Distributed Coordination Function (DCF) Point Coordination Function (PCF)
E N D
MAC for WLAN Doug Young Suh suh@khu.ac.kr Last update : Aug 1, 2009 WLAN DCF PCF
IEEE802.11 Wireless MAC • MAC Service and functions • MAC Addressing • Fragmentation • Carrier sense mechanisms • Channel Access Protocols • Distributed Coordination Function (DCF) • Point Coordination Function (PCF) • Extended MAC for QoS (802.11e) • Power management • Security Network layer DLL LLC sublayer MAC sublayer MSDU PHY WLAN DCF PCF
MAC service and functions • Transmitting/receiving MSDU between PHY and LLC • Specifying various PHY layer parameters • Unicast, multicast, broadcast data • Fragmentation and defragmentation WLAN DCF PCF
MAC Addressing • 48-bit IEEE 802 addresseⅹ4 • Each BSS also has a BSS ID • the MAC address of the AP • If not, randomly generated B 0b.cd.ef.gh.22.22 AP2 0b.cd.ef.gh.55.66 AP1 0b.cd.ef.gh.33.55 A 0b.cd.ef.gh.11.11 WLAN DCF PCF
Fragmentation/defragmentation • One MSDU multi MPDUs • Even if an MPDU is lost, previous ones are valid. • <SA, MSDU seq #, MPDU fragment #> • Timer and aMaxMSDUtransmitLifetime MSDU MAC HDR C R C MAC HDR C R C MAC HDR C R C MAC HDR C R C Frame body Frame body Frame body Frame body WLAN DCF PCF
Carrier Sense Mechanism • The PHY-CCA.indicate primitive indicates to the MAC whether the channel is BUSY or IDLE. • NAV (Network Allocation Vector) • The length of time that is to elapse before the channel becomes IDLE (available). • The duration field in frame contains the length of time for which the transmitting station expects the channel to be busy. WLAN DCF PCF
Channel Access Protocols WLAN DCF PCF
Principles of Channel Access Protocols • Prioritized CDMA/CA • Random backoff for the transmission time • Priority : The higher, the shorter idle time. • IFS (Inter-Frame Space) • SIFS (Short IFS) between ACKS and consecutive fragments of the same MSDU • PIFS (PCF IFS), DIFS (DPCF IFS) • EIFS (Extended IFS) : for DCF after errors • SIFS < PIFS < DIFS WLAN DCF PCF
IFS (Inter Frame Space) Interframe spacing in 802.11. WLAN DCF PCF
DCF • The station’s timer runs after DIFS. DIFS DIFS BUSY BUSY A B C D • At A, a frame from LLC, the station senses the medium busy, and calculates a backoff time of 12 slots. • From B, the station’s timer runs until the medium busy, and re-starts at C • At D, the timer expires and the station transmits. WLAN DCF PCF
Backoff time • Random variable within [0, CW] • CW (Contention Window) • CW varies CWmin to CWmax • After a successful transmission, CW=Cwmin • At unsuccessful transmission, CW *=2 • Note that worse station becomes to have worse chance for increasing overall throughput. This is problem for realtime multimedia service? WLAN DCF PCF
Transmitting multiple fragments SIFS SIFS SIFS SIFS SIFS Fragment 1 Fragment 2 Fragment 3 (last) A C K A C K A C K • ACKs are sent after only SIFS • Next fragment is sent if and only is an ACK is received. • A station may maintain control of the medium to transmit multiple fragments of the same MSDU. * All fragments but last are in the same size. WLAN DCF PCF
RTS/CTS • Seize the medium for a long unicast sequence • Request-To-Send, Clear-To-Send • RTS has the Duration field to set the total time required for the sequence and the last ACK. • All other stations receives the RTS/CTS to update their NAV and do not transmit until the end of the transmission. • Overcomes ‘hidden node’ problem • ABC : When C is not seen to A, for AB • No RTS/CTS for multicast/broadcast DIFS PIFS SIFS Contention window NAV of others SIFS SIFS SIFS SIFS SIFS SIFS SIFS Fragment 0 Fragment 1 Fragment 2 (last) RTS ACK ACK CTS ACK WLAN DCF PCF
Point Coordination Function(PCF) WLAN DCF PCF
PCF Overview • In a Point Coordinator, part of an AP • Not in 11a, 11b, or 11g, but in 11e • Backward compatible to DCF in 11a, 11b, and 11g • Contention-free period and contention period • PCF during CFP, in every CFP repetition interval • DCF during CP • From the PC to other stations after PIFS • From other station to PC in response to a poll from the PC • Types of frames during the PCF : piggy-back allowed • Data, CF-Poll, CF-ACK, Null, CF-End • Null : negative response to CF-Poll WLAN DCF PCF
PCF Frame Sequence • Dx = frames sent by Point Coordinator • Ux = frames sent by polled stations Contention-free repetition interval Contention-free period PIFS SIFS SIFS SIFS SIFS SIFS SIFS SIFS PIFS SIFS SIFS SIFS beacon D1+pol1 D2+ack +pol2 D3+ack +pol3 D4 +pol4 CF-End U1+ack U2 +ack U4+ack Contention period No response to CF-Poll 3 Reset NAV NAV of other stations CF_Max_Duration WLAN DCF PCF
CF-Polling • CF-Pollable and Non-CF-Pollable • Every station registers to the AP to be a CF-Pollable station . • Non-CF-Pollable in the DCF rules. • Polling list * CF (Contention Free) WLAN DCF PCF