introduction to 802.11. wireless lans: 802.11 supports both asynchronous data transfer and time...

31
Introduction to 802.11

Post on 21-Dec-2015

240 views

Category:

Documents


0 download

TRANSCRIPT

Introduction to 802.11

Wireless LANs: 802.11 Supports both Asynchronous data transfer and time bound services Asynchronous: traffic insensitive to time - email, FTP Time bound services: sensitive to time - voice traffic Different MAC strategies to support these classes of traffic Asynchronous traffic is supported through Distributed Co-ordination Function

(DCF) Time bound traffic is supported through Point Co-ordination Function (PCF)

DCF is mandatory, while PCF is optional

802.11 Terminologies

BSS: Basic service set Group of stations under the direct control of a single co-

ordination function All stations in a BSS can directly communicate with each other,

without any infrastructure Geographical area covered by BSS is BS Area BSA is similar in concept to a ‘cell’ in a cellular network

802.11 Terminologies

Access Point (AP): Similar to the base station in cellular network Supports range extension by providing network connectivity

between multiple BSSs Multiple BSSs are connected together through a Distribution

System (DS) DS is similar to a backbone network BSSs connected by a DS form an Extended Service Set (ESS)

802.11 Terminologies

PORTAL: Acts as the gateway to other networks

802.11 MAC Sub-layer

Transmission medium can Operate only in contention mode, called as Contention Period -

CP Alternate between contention & contention free modes In contention free mode, the medium access is controlled by the

AP Contention Free mode is also known as Contention Free Period

(CFP)

802.11 MAC Frames Management Frames: Used for

Station association, dissociation, timing and synchronization, authentication

Control Frames: Used for Handshaking during CP (RTS/CTS) ACK frames during CP

Data Frames: Used for Sending data during CP and CFP

802.11: DCF Fundamental channel access method in 802.11 Used by asynchronous data services Basis for PCF Based on CSMA/CA (Collision Avoidance) Collision detection is not used, because a station cannot listen to the

(air) channel for collisions when transmitting

802.11: DCF – Carrier Sensing Two kinds of sensing Physical carrier sensing

Takes place at the air interface Detects signal strength from other sources

Virtual Carrier Sensing Takes place at the MAC layer (explained shortly)

Channel is said to be idle only when both the sensing mechanisms report ‘idle’

802.11: DCF – Basic Operation Inter frame space (IFS): Time interval between transmission of

frames Three IFS values are specified

DCF-IFS (DIFS) PCF-IFS (PIFS) Short-IFS (SIFS)

SIFS < PIFS < DIFS Priority access to the medium is controlled through these three IFS

intervals

802.11: DCF – Basic Operation

1. A station wanting to transmit, senses the medium2. If it is idle, waits for DIFS interval, and senses again3. If the medium is free, frame is transmitted4. If the receiver gets the frame correctly, it sends an ACK to the

sender after a SIFS interval

DCF – Basic Operation If the medium is found to be busy either in step 1 or 2, back-off

procedure is invoked What is back-off? How is idle detected?

Clear Channel Assessment If the received signal strength exceeds the CCA, the channel is

declared to be busy Note that this does not require locking to the carrier, just signal

strength NAV (Network Allocation Vector) or virtual channel sensing

DCF – Virtual Carrier Sensing

The MAC header has the ‘duration’ field, which indicates for how long the sender wants to hold the medium

Other stations read this field, and adjust a parameter called ‘Network Allocation Vector’ (NAV)

NAV indicates the amount of time that must elapse until the channel can be sampled again for idle status

NAV value thus indirectly indicates if the channel is free at any given time Using NAV value to determine channel status is called as ‘Virtual Carrier

Sensing’

DCF – Data Transmission

DCF with RTS/CTS Sender cannot detect a collision during transmission If a large frame is sent, and if collision occurs, then lot of channel

BW is wasted To prevent this waste, Request to Send (RTS) and Clear To Send

(CTS) control frames are used RTS/CTS helps a station to seize the channel for a short time; so no

collisions

DCF – RTS/CTS

A sender, after contending for the channel, sends a RTS frame RTS/CTS frames are small (20 bytes), so in case of collision,

less BW is wasted All stations in the BSS, read the RTS frame and adjust their NAV

accordingly After SIFS amount of time, the destination responds to the RTS with

a CTS frame

DCF – RTS/CTS

Stations modify their NAV on reading CTS This helps to combat the “hidden terminal” problem (what is this?)

On receiving CTS, sender transmits the data frame after an interval of SIFS, which the receiver ACKs

RTS/CTS prevents BW waste, but Creates additional delay under light loads Causes collisions Probability should not be used

802.11 MAC Frame

Frame

Control

Duration

IDAddr 1 Addr 2 Addr 3 Addr 4Sequence

ControlCRC

FrameBody

2 2 6 6 6 62 0-2312 4

802.11 MAC Header

Bytes:

ProtocolVersion

Type SubTypeToDS

RetryPwrMgt

MoreData

WEP Rsvd

Frame Control Field

Bits: 2 2 4 1 1 1 1 1 1 1 1

DSFrom More

Frag

• Frame formats– RTS (20B)

• Frame control (2B)– Protocols version (2bits) (802.11 = 00, so if not 00, then the following means something different)– Type (2 bits)- management, control,data, reserved– subtype (4bits), e.g., control|RTS, management|beacon,…– To DS (DP) (1 bit)– From DS (1bit)– More frag (1b)– This is a Retry (1b)– Pwr mgt (1b) (=1 means the STA will go to power save (i.e., periodic sleep) after the frame is received)– More data (1b) – if a STA is in power save mode, then this is used to signify that more data is waiting, so maybe the

STA should wake up and get the data!)– Protected frame (1b) (WEP, etc.)– Order (1b)

– Duration / ID (2B) (but MSB is zero, so 15 bits for the duration) in microsec (rounded up) (ID is used in power save mode)– RA receiver address (6B)– TA transmitter address (6B)– FCS – CRC-32 (4B)

– CTS (14B)– Frame control– Duration = duration in RTS – time to transmit CTS – 1 SIFS– RA (no transmit address)– FCS

– ACK (14B)– Frame control– Duration = 0 unless it is an ACK one for several more frames of a fragmented packet– RA– FCS

– Data frame 34B overhead– Frame control (2B)– Duration (2B)– Address 1 (6B)– Address 2 (6B)– Address 3 (6B) (homework, what are these addresses used for)– Sequence control 2B (for fragmenting)– Address 4 (6B)– Frame body, up to 2312B– FCS 4B

Frame sizes and contentsMAC frames are called MPDU (MAC protocol Data Unit)

Physical Protocol Data Unit (802.11b)

PLCP (phy layer convergence protocol = phy with MAC frame inside) PLCP preamble (144 bits)

SYNC (128b) – to let the physical layer acquire sync (transmitter actually begins transmitting before this. This period is called ramp up where the transmitter goes from 0 zero to full/desired power. This typically takes ~ 1us)

SFD (16b)– like a radio ID, IEEE 802.11 has SFD-F3A0hex PLCP header (48 bits)

Signal (8b) – specifies the modulation used for the MAC frame Service (8b) – reserved Length (16b) in micro seconds (not MAC duration, So this seems to

be ignored) CRC (16b)

PLCP SYNC and header always take 192 us MPDU (MAC protocol data unit) or PSDU (PLCP service Data unit)

Short PLCP (optional) Preamble – 72 bits at 1 Mbps PLCP header – 48 bits at 2Mbps The preamble and header takes 96 us MPDU / PSDU at 2, 5.5, … Mbps

Since the PLCP is sent at 2 Mbps, the channel must be able to support 2 or more Mbps

In practice the short header does not work well unless the channel is very good.

802.11 g PLCP preamble and header are similar to 802.11b PSDU

Long Training sequence 1.6 us guard interval Long training symbol (3.2 us) Long training symbol (3.2us) (again) Total = 8 us

OFDM signal Guard interval 0.8 us (This is quite short) Signal 3.2 us Total 4 us Transmitted at 6 Mbps OFDM modulation – which is the worst

performing modulation – it has the same SNR-BER relationship at 9 and 12 Mbps.

Data 6 us of quiet time (time to decode and error correct) to SIFS is

16 us

802.11 overhead Four 192b from PLCP

At 1Mbps = 192 microsec so 768 microsec 82B from RTS, CTS, ACK, data

656 mic sec at 1Mbps 328 micro sec at 2Mbps 131 at 5Mbps 60 at 11Mbps 12 at 54Mbps

1 DIFS, 3 SIFS, 4 propagation delays 30 microsec + 3*20 micro + 4*2 microsec = 98 microsec

Total overhead time 1552 mic sec at 1Mbps 1194 micro sec at 2Mbps 997 at 5Mbps 925 at 11Mbps 878 at 54Mbps

Data duration 40B packet

320 mic at 1Mbps => efficiency data duration over all duration = 17% 160 2Mpbs => 11% 64 => 6% 29 => 3% 6 at 54 Mbps => 0.6%

1500B packet 12000 mic at 1Mbps => 89% 6000 2Mpbs => 83% 2400 => 70% 1090 => 54% 222 at 54 Mbps => 20%

Small packets and high data rates are inefficient. Increasing packet size would help efficiency (similar things occur in wired TCP). 802.11n and 802.16 can transmit multiple frames with one set of overhead

802.11 overhead w/o RTS/CTS two 192b from PLCP

At 1Mbps = 192 microsec so 384 microsec 14B from RTS, CTS, ACK, data

112 mic sec at 1Mbps 56 micro sec at 2Mbps 22 at 5Mbps 10 at 11Mbps 2 at 54Mbps

1 DIFS, 1 SIFS, 1 propagation delays 30 microsec + 20 micro + 2 microsec = 52 microsec

Total overhead time 548 mic sec at 1Mbps 492 micro sec at 2Mbps 458 at 5Mbps 446 at 11Mbps 438 at 54Mbps

Data duration 40B packet

320 mic at 1Mbps => efficiency data duration over all duration = 36% 160 2Mpbs => 24% 64 => 12% 29 => 6% 6 at 54 Mbps => 1%

1500B packet 12000 mic at 1Mbps => 96% 6000 2Mpbs => 92% 2400 => 83% 1090 => 70% 222 at 54 Mbps => 33%\

If the packet is smaller than RTSThreshold, then RTS/CTS are not used

DCF – Fragmentation Large data units passed on by higher layers may be fragmented Fragmentation increases transmission reliability If data units are greater than a threshold, fragmentation is invoked

802.11: DCF – Basic Operation

1. A station wanting to transmit, senses the medium2. If it is idle, waits for DIFS interval, and senses again3. If the medium is free, frame is transmitted4. If the receiver gets the frame correctly, it sends an ACK to the

sender after a SIFS interval

If the medium is found to be busy either in step 1 or 2, back-off procedure is invoked

802.11: DCF – Back-Off

If the medium is found to be busy either in step 1 or 2, back-off procedure is invoked

When invoked, station waits until the medium is free for a DIFS time, and starts a random timer

Timer is decremented as long as the medium is free If the medium becomes busy, the timer is frozen Timer is decremented, when medium becomes free again for a DIFS

time When timer reaches zero, the frame is transmitted Collisions are detected through a lack of ACK If collision occurs, the doubles the size of the backoff window and

repeats the back-off process

Back-off (w/o RTS/CTS)start

MAC receives a pkt

Set BOtimer = slotTime*Rand(0,CW-1)

Rand(0,n) = Random integer between 0 and N

Wait for idle channel

backoff

Set DIFStimer = DIFS

Wait DIFS

Channel is busy

DIFSTimer == 0

transmit

Wait for ACK

CW = min(1024, CW*2)

No ACK

Channel is busy

BOTimer == 0

done

ACK

CW = CWmin (e.g., 7)

ShortTryCounter = 0

Channel is idle

Channel is busy

If channel was not idle but no packet was decoded,set DIFStimer = EDIFS

ShortTryCounter++

ShortTryCounter == MaxNumTries

TryCounter < MaxNumTries

Max number of transmissions If an RTS fails to generate a CTS, then the Short Retry count is

incremented, until is reaches the short_retry_limit If RTS is received, the ShortRetryCount = 0 If the pkt size is below RTSThreshold (so no RTS is transmitted), and

fails to generate an ACK, then the Short retry count is incremented When small data pkt is successful, the short retry count is reset to

zero If pkt size is above RTSThreshold and fails to result in an ACK, then the

long retry is incremented. If the pkt is successfully transmitted, then long retry count is reset to 0 If a pkt is dropped due to too many failed attempts, the retry counters

are set to zero

Using ACKs to increase data rate Envelop analysis

Suppose that the pkt error prob for 10 Mbps is 0 and the pkt error prob for 20 Mbps is 0.25.

The effective data rate at 10 Mbps is 10 Mbps, and at 20, is 0.75*20 > 10, so 20 is better, even though there will be many losses and retransmissions.

When a transmission fails, it must wait DIFS and then back off Suppose an empty channel

DIFS, Data, SIFS, ACK If Fails, then wait, [0,7]*SlotTime and repeat the above If Fails again, then wait, [0,13]*SlotTime and repeat the above

What is the effective data rate when 10Mbps is used vs 20Mbps?

E transmission time

pT 1 pp3. 5S 2T 1 p2p3. 5 6. 5S 3T . . . 1 p8 3. 5 6. 5 . . . 511. 11 p S 9T T

1 p