Wireless Local Area Networks. The proliferation of laptop computers and other mobile devices (PDAs...

53
Wireless Local Area Networks

Transcript of Wireless Local Area Networks. The proliferation of laptop computers and other mobile devices (PDAs...

Page 1: Wireless Local Area Networks. The proliferation of laptop computers and other mobile devices (PDAs and cell phones) created an obvious application level.

Wireless Local Area Networks

Page 2: Wireless Local Area Networks. The proliferation of laptop computers and other mobile devices (PDAs and cell phones) created an obvious application level.

Wireless Local Area Networks• The proliferation of laptop computers and

other mobile devices (PDAs and cell phones) created an obvious application level demand for wireless local area networking.

• Companies jumped in, quickly developing incompatible wireless products in the 1990’s.

• Industry decided to entrust standardization to IEEE committee that dealt with wired LANS – namely, the IEEE 802 committee!!

Page 3: Wireless Local Area Networks. The proliferation of laptop computers and other mobile devices (PDAs and cell phones) created an obvious application level.

Wireless MAC Protocol

Outline:• design challenges for wireless

MAC– hidden/exposed stations– flexible control for QoS support

• two design paradigms– multiple access based– token based

• rationale for design choices

Page 4: Wireless Local Area Networks. The proliferation of laptop computers and other mobile devices (PDAs and cell phones) created an obvious application level.

Wireless Networking Environment• A simple model:

– A single shared physical channel among users– Omni-directional antenna, limited transmission range– Same transmission rate for all users

• Channel characteristics(illustrated with examples)– wireless transmission is spatial and local– sender & receiver: different views of the world– relevant contention is at the receiver side– contention may induce collisions– contention/collision/congestion is location dependent– channel access is a collective behavior from the fairness perspective: the notion

of “local” is misnomer

• Wireless MAC: how to address channel access in a wireless environment

Page 5: Wireless Local Area Networks. The proliferation of laptop computers and other mobile devices (PDAs and cell phones) created an obvious application level.

Design Goals for Wireless MAC

• Requirements for a wireless MAC protocol:– robustness– efficiency– fairness– support for priority and QoS– support for multicast

Page 6: Wireless Local Area Networks. The proliferation of laptop computers and other mobile devices (PDAs and cell phones) created an obvious application level.

Hidden Station Problem• Hidden Stations: within the range of the intended

receiver, but out of range of the transmitter– hidden sender C

AA BB DDCC

AA BB DDCC

Problem: A transmits to B, if C transmits (to D), collision at BSolution: hidden sender C needs to defer (Question: who tells C, A or B?)

Problem: A transmits to B, if D xmits to C, C cannot reply. D confuses (4 cases)Solution: D needs to be notified that its receiver C is hidden

– hidden receiver C

Page 7: Wireless Local Area Networks. The proliferation of laptop computers and other mobile devices (PDAs and cell phones) created an obvious application level.

Exposed Station Problem• Exposed Stations: within the range of the intended

sender, but out of range of the receiver– exposed sender B

AA BB DDCC

AA BB DDCC

Problem: C transmits to D, if B transmits (to A), B cannot hear from ASolution: exposed sender B needs to defer

Problem: C transmits to D, if A xmits to B, B cannot reply. A confuses (4 cases)Solution: A needs to be notified that its receiver B is exposed (how can B hears A?)

– exposed receiver B

Page 8: Wireless Local Area Networks. The proliferation of laptop computers and other mobile devices (PDAs and cell phones) created an obvious application level.

Summary of hidden and exposed station problem

• Receiver’s perception of a clean/collided packet is critical

• Hidden/exposed senders need to defer their transmissions

• Hidden/exposed receivers need to notify their senders about their status

Page 9: Wireless Local Area Networks. The proliferation of laptop computers and other mobile devices (PDAs and cell phones) created an obvious application level.

MAC Protocol

Resolve channel contention & access:• Channel access arbitration

– know who are there– allocate the channel among multiple senders & receivers who

share the channel

• Collision avoidance– multiple access based– token based

• Collision resolution– backoff based

Page 10: Wireless Local Area Networks. The proliferation of laptop computers and other mobile devices (PDAs and cell phones) created an obvious application level.

Solution Space for channel contention

• Multiple access approach– with carrier sensing

• carrier sensing: provides collision information at the sender, NOT the receiver

• FAMA, 802.11

– without carrier sensing• MACA, MACAW

– cons and pros: robust, solves hidden/exposed station problem, hard to provide QoS

• Token based approach– TDMA, DQRUMA

– cons and pros: easy to provide QoS, less robust, hard to handle hidden/exposed stations

Page 11: Wireless Local Area Networks. The proliferation of laptop computers and other mobile devices (PDAs and cell phones) created an obvious application level.

IEEE 802 Standards Working Groups

The important ones are marked with *. The ones marked with are hibernating. The one marked with † gave up.

Page 12: Wireless Local Area Networks. The proliferation of laptop computers and other mobile devices (PDAs and cell phones) created an obvious application level.

IEEE Standards for Wireless Networks

IEEE 802.11 Wireless LANs

IEEE 802.15 Wireless Personal Area Networks (WPAN)

IEEE 802.16 Broadband Wireless Access (BBWA)

IEEE 802.20 Mobile Broadband Wireless Access (MBWA)

IEEE 802.21 Media Independent Handover (MIH)

IEEE 802.22 Wireless Regional Area Networks

Page 13: Wireless Local Area Networks. The proliferation of laptop computers and other mobile devices (PDAs and cell phones) created an obvious application level.

IEEE 802.11 (WLAN)802.11a 5 GHz, up to 54 Mbps

802.11b 2.4 GHz, up to 11 Mbps

802.11d Enables 802.11 to work in various countries where it can't today

802.11e QoS Enhancement

802.11f Adds Access Point Interoperability

802.11g 2.4 GHz, up to 54 GHz, compatible with 802.11b

802.11h Resolves interference issues

802.11i Security Enhancement

802.11j Japanese regulatory extensions

802.11k Radio resource measurement

802.11m Enhanced maintenance features, improvements, and amendments

802.11n Next generation of 802.11 with throughput in excess of 100Mbps

802.11r Enhancements for fast roaming of WLAN units

802.11s Wireless mesh networks

Page 14: Wireless Local Area Networks. The proliferation of laptop computers and other mobile devices (PDAs and cell phones) created an obvious application level.

Common Aliases of Wireless Standards

802.11b/g Wi-Fi

802.15.1 Bluetooth

802.15.3 Ultra Wideband

802.15.4 ZigBee

802.16 WiMAX

Page 15: Wireless Local Area Networks. The proliferation of laptop computers and other mobile devices (PDAs and cell phones) created an obvious application level.

Categories of Wireless Networks• Base Station :: all communication through

an access point {note hub topology}. Other nodes can be fixed or mobile.

• Infrastructure Wireless :: base station network is connected to the wired Internet.

• Ad hoc Wireless :: wireless nodes communicate directly with one another.

• MANETs (Mobile Ad Hoc Networks) :: ad hoc nodes are mobile.

Page 16: Wireless Local Area Networks. The proliferation of laptop computers and other mobile devices (PDAs and cell phones) created an obvious application level.

Wireless LANs

a) Wireless networking with a base station. (b) Ad hoc networking.

Page 17: Wireless Local Area Networks. The proliferation of laptop computers and other mobile devices (PDAs and cell phones) created an obvious application level.

The 802.11 Protocol Stack

Part of the 802.11 protocol stack.

Page 18: Wireless Local Area Networks. The proliferation of laptop computers and other mobile devices (PDAs and cell phones) created an obvious application level.

IEEE standard: 802.11

mobile terminal

access point

server

fixed terminal

application

TCP

802.11 PHY

802.11 MAC

IP

802.3 MAC

802.3 PHY

application

TCP

802.3 PHY

802.3 MAC

IP

802.11 MAC

802.11 PHY

LLC

infrastructure network

LLC LLC

Page 19: Wireless Local Area Networks. The proliferation of laptop computers and other mobile devices (PDAs and cell phones) created an obvious application level.

Wireless Physical Layer • Physical layer conforms to OSI (five options)

– 1997: 802.11 infrared, FHSS, DHSS– 1999: 802.11a OFDM and 802.11b HR-DSSS– 2001: 802.11g OFDM

• 802.11 Infrared– Two capacities 1 Mbps or 2 Mbps.– Range is 10 to 20 meters and cannot penetrate walls.– Does not work outdoors.

• 802.11 FHSS (Frequence Hopping Spread Spectrum)– The main issue is multipath fading.– 79 non-overlapping channels, each 1 Mhz wide at low end of 2.4 GHz

ISM band.– Same pseudo-random number generator used by all stations.– Dwell time: min. time on channel before hopping (400msec).

Page 20: Wireless Local Area Networks. The proliferation of laptop computers and other mobile devices (PDAs and cell phones) created an obvious application level.

Wireless Physical Layer • 802.11 DSSS (Direct Sequence Spread Spectrum)

– Spreads signal over entire spectrum using pseudo-random sequence (similar to CDMA).

– Each bit transmitted using an 11 chips Barker sequence, PSK at 1Mbaud.– 1 or 2 Mbps.

• 802.11a OFDM (Orthogonal Frequency Divisional Multiplexing)– Compatible with European HiperLan2.– 54Mbps in wider 5.5 GHz band transmission range is limited.– Uses 52 FDM channels (48 for data; 4 for synchronization).– Encoding is complex ( PSM up to 18 Mbps and QAM above this capacity).– E.g., at 54Mbps 216 data bits encoded into into 288-bit symbols.– More difficulty penetrating walls.

Page 21: Wireless Local Area Networks. The proliferation of laptop computers and other mobile devices (PDAs and cell phones) created an obvious application level.

Wireless Physical Layer • 802.11b HR-DSSS (High Rate Direct Sequence

Spread Spectrum)– 11a and 11b shows a split in the standards committee.

– 11b approved and hit the market before 11a.

– Up to 11 Mbps in 2.4 GHz band using 11 million chips/sec.

– Note in this bandwidth all these protocols have to deal with interference from microwave ovens, cordless phones and garage door openers.

– Range is 7 times greater than 11a.

– 11b and 11a are incompatible!!

Page 22: Wireless Local Area Networks. The proliferation of laptop computers and other mobile devices (PDAs and cell phones) created an obvious application level.

Wireless Physical Layer • 802.11g OFDM(Orthogonal Frequency Division

Multiplexing)– An attempt to combine the best of both 802.11a and

802.11b.

– Supports bandwidths up to 54 Mbps.

– Uses 2.4 GHz frequency for greater range.

– Is backward compatible with 802.11b.

Page 23: Wireless Local Area Networks. The proliferation of laptop computers and other mobile devices (PDAs and cell phones) created an obvious application level.

802.11 - MAC layer • Access methods

– MAC-DCF CSMA/CA (mandatory)

• collision avoidance via randomized “back-off” mechanism

• minimum distance between consecutive packets

• ACK packet for acknowledgements (not for broadcasts)

– MAC-DCF w/ RTS/CTS (optional)

• Distributed Foundation Wireless MAC

• avoids hidden terminal problem

– MAC- PCF (optional)

• access point polls terminals according to a list

Page 24: Wireless Local Area Networks. The proliferation of laptop computers and other mobile devices (PDAs and cell phones) created an obvious application level.

Distribute Coordination Function (DCF)

• Uses CSMA/ CA (CSMA with Collision Avoidance).

– Uses both physical and virtual carrier sensing.

– Two methods are supported:

1. based on MACAW(Multiple Access with Collision Avoidance for Wireless) with virtual carrier sensing.

2. 1-persistent physical carrier sensing.

Page 25: Wireless Local Area Networks. The proliferation of laptop computers and other mobile devices (PDAs and cell phones) created an obvious application level.

Virtual Channel Sensing in CSMA/CA

• “virtual” implies source station sets duration field in data frame or in Ready-to-Send (RTS) and Clear-to-Send (CTS) frames.

• Stations then adjust their NAV (Network Allocation Vector) accordingly!

Page 26: Wireless Local Area Networks. The proliferation of laptop computers and other mobile devices (PDAs and cell phones) created an obvious application level.

1-Persistent Physical Carrier Sensing

• Station senses the channel when it wants to send.• If idle, station transmits.

– Station does not sense channel while transmitting.

• If the channel is busy, station defers until idle and then transmits.

• Upon collision, wait a random time using binary exponential backoff.

Page 27: Wireless Local Area Networks. The proliferation of laptop computers and other mobile devices (PDAs and cell phones) created an obvious application level.

802.11 - MAC layer (cont)• Priorities

– defined through different inter frame spaces– no guaranteed, hard priorities– 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 busySIFS

PIFS

DIFSDIFS

next framecontention

Access (after CWmin) if medium is free DIFS

Page 28: Wireless Local Area Networks. The proliferation of laptop computers and other mobile devices (PDAs and cell phones) created an obvious application level.

t

medium busy

DIFSDIFS

next frame

contention window(randomized back-offmechanism)

802.11 - CSMA/CA basic access method

– station ready to send starts sensing the medium (Carrier Sense based on CCA, Clear Channel Assessment)

– if the medium is free for the duration of an Inter-Frame Space (IFS), the station can start sending after CWmin (IFS depends on packet type)

– if the medium is busy, the station has to wait for a free IFS, then the station must additionally wait a random back-off time (collision avoidance, multiple of slot-time)

– if another station occupies the medium during the back-off time of the station, the back-off timer stops (fairness)

slot timedirect access if medium is free DIFS

Page 29: Wireless Local Area Networks. The proliferation of laptop computers and other mobile devices (PDAs and cell phones) created an obvious application level.

802.11 - CSMA/CA (cont)• Sending unicast packets

– station has to wait for DIFS (and CWmin) before sending data– receivers acknowledge at once (after waiting for SIFS) if the packet was received

correctly (CRC)– automatic retransmission of data packets in case of transmission errors

t

SIFS

DIFS

data

ACK

waiting time

otherstations

receiver

senderdata

DIFS

contention

Page 30: Wireless Local Area Networks. The proliferation of laptop computers and other mobile devices (PDAs and cell phones) created an obvious application level.

IEEE 802.11 MAC ProtocolCSMA Version of the Protocol:

sense channel idle for DISF sec (Distributed Inter Frame Space)

transmit frame (no Collision Detection)

receiver returns ACK after SIFS (Short Inter Frame Space)

if channel sensed busy => binary backoff

NAV: Network Allocation Vector (min time of deferral)

Page 31: Wireless Local Area Networks. The proliferation of laptop computers and other mobile devices (PDAs and cell phones) created an obvious application level.

802.11 - CSMA/CA with RTS/CTS• Sending unicast packets

– station can send RTS with reservation parameter after waiting for DIFS (reservation declares amount of time the data packet needs the medium)

– acknowledgement via CTS after SIFS by receiver (if ready to receive)– sender can now send data at once, acknowledgement via ACK– other stations store medium reservations distributed via RTS and CTS

t

SIFS

DIFS

data

ACK

defer access

otherstations

receiver

senderdata

DIFS

contention

RTS

CTSSIFS SIFS

NAV (RTS)NAV (CTS)

Page 32: Wireless Local Area Networks. The proliferation of laptop computers and other mobile devices (PDAs and cell phones) created an obvious application level.

Collision Avoidance• RTS freezes stations near the transmitter• CTS “freezes” stations within range of receiver (but possibly hidden

from transmitter); this prevents collisions by hidden station during data transfer

• RTS and CTS are very short: collisions during data phase are thus very unlikely (similar effect as Collision Detection)

• Note: IEEE 802.11 allows CSMA, CSMA/CA and “polling” from AP

Page 33: Wireless Local Area Networks. The proliferation of laptop computers and other mobile devices (PDAs and cell phones) created an obvious application level.

Fragmentation in 802.11

• High wireless error rates long packets have less probability of being successfully transmitted.

• Solution: MAC layer fragmentation with stop-and-wait protocol on the fragments.

Page 34: Wireless Local Area Networks. The proliferation of laptop computers and other mobile devices (PDAs and cell phones) created an obvious application level.

Point Coordinated Function (PCF)

• PCF uses a base station to poll other stations to see if they have frames to send.

• No collisions occur.

• Base station sends beacon frame periodically.

• Base station can tell another station to sleep to save on batteries and base stations holds frames for sleeping station.

Page 35: Wireless Local Area Networks. The proliferation of laptop computers and other mobile devices (PDAs and cell phones) created an obvious application level.

MAC-PCF (Point Coordination Function) like polling

PIFS

stations‘NAV

wirelessstations

point coordinator

D1

U1

SIFS

NAV

SIFSD2

U2

SIFS

SIFS

SuperFramet0

medium busy

t1

Page 36: Wireless Local Area Networks. The proliferation of laptop computers and other mobile devices (PDAs and cell phones) created an obvious application level.

MAC-PCF (cont)

tstations‘NAV

wirelessstations

point coordinator

D3

NAV

PIFSD4

U4

SIFS

SIFSCFend

contentionperiod

contention free period

t2 t3 t4

Page 37: Wireless Local Area Networks. The proliferation of laptop computers and other mobile devices (PDAs and cell phones) created an obvious application level.

DCF and PCF Co-Existence• Distributed and centralized control can co-exist using

InterFrame Spacing.• SIFS (Short IFS) :: is the time waited between packets

in an ongoing dialog (RTS,CTS,data, ACK, next frame)

• PIFS (PCF IFS) :: when no SIFS response, base station can issue beacon or poll.

• DIFS (DCF IFS) :: when no PIFS, any station can attempt to acquire the channel.

• EIFS (Extended IFS) :: lowest priority interval used to report bad or unknown frame.

Page 38: Wireless Local Area Networks. The proliferation of laptop computers and other mobile devices (PDAs and cell phones) created an obvious application level.

Interframe Spacing in 802.11.

Page 39: Wireless Local Area Networks. The proliferation of laptop computers and other mobile devices (PDAs and cell phones) created an obvious application level.

CSMA/CA Protocol: congestion control

Page 40: Wireless Local Area Networks. The proliferation of laptop computers and other mobile devices (PDAs and cell phones) created an obvious application level.

Congestion Avoidance:IEEE 802.1 DCF

• Before transmitting a packet, randomly choose a backoff interval in the range [0,cw]

– cw is the contention window

• “Count down” the backoff interval when medium is idle

– Count-down is suspended if medium becomes busy

• When backoff interval reaches 0, transmit packet (or RTS)

Page 41: Wireless Local Area Networks. The proliferation of laptop computers and other mobile devices (PDAs and cell phones) created an obvious application level.

DCF Example

data

waitB1 = 5

B2 = 15

B1 = 25

B2 = 20

data

wait

B1 and B2 are backoff intervalsat nodes 1 and 2

Let cw = 31

B2 = 10

Page 42: Wireless Local Area Networks. The proliferation of laptop computers and other mobile devices (PDAs and cell phones) created an obvious application level.

Congestion Avoidance

• The time spent counting down backoff intervals contributes to MAC overhead

• Choosing a large cw leads to large backoff intervals and can result in larger overhead

• Choosing a small cw leads to a larger number of collisions (more likely that two nodes count down to 0 simultaneously)

Page 43: Wireless Local Area Networks. The proliferation of laptop computers and other mobile devices (PDAs and cell phones) created an obvious application level.

Congestion Control

• Since the number of nodes attempting to transmit simultaneously may change with time, some mechanism to manage congestion is needed

• IEEE 802.11 DCF: Congestion control achieved by dynamically adjusting the contention window cw

Page 44: Wireless Local Area Networks. The proliferation of laptop computers and other mobile devices (PDAs and cell phones) created an obvious application level.

Binary Exponential Backoff in DCF

• When a node fails to receive CTS in response to its RTS, it increases the contention window– cw is doubled (up to an upper bound – typically

5 times)

• When a node successfully completes a data transfer, it restores cw to CWmin

Page 45: Wireless Local Area Networks. The proliferation of laptop computers and other mobile devices (PDAs and cell phones) created an obvious application level.

MILD Algorithm in MACAW [Bharghavan94Sigcomm]

• When a node fails to receive CTS in response to its RTS, it multiplies cw by 1.5

– Less aggressive than 802.11, which multiplies by 2

• When a node successfully completes a transfer, it reduces cw by 1

– More conservative than 802.11, where cw is restored to Cwmin

– 802.11 reduces cw much faster than it increases it

– MACAW: cw reduction slower than the increase

Exponential Increase Linear Decrease

• MACAW can avoid wild oscillations of cw when congestion is high

Page 46: Wireless Local Area Networks. The proliferation of laptop computers and other mobile devices (PDAs and cell phones) created an obvious application level.

CSMA/CA Protocol: fairness

Page 47: Wireless Local Area Networks. The proliferation of laptop computers and other mobile devices (PDAs and cell phones) created an obvious application level.

Fairness Issue

• Many definitions of fairness plausible

• Simplest definition: All nodes should receive equal bandwidth

A B

C D

Two flows

Page 48: Wireless Local Area Networks. The proliferation of laptop computers and other mobile devices (PDAs and cell phones) created an obvious application level.

Fairness Issue• Assume that initially, A and B both choose a backoff

interval in range [0,31] but their RTSs collide

• Nodes A and B then choose from range [0,63]

– Node A chooses 4 slots and B choose 60 slots

– After A transmits a packet, it next chooses from range [0,31]

– It is possible that A may transmit several packets before B transmits its first packet

A B

C D

Two flows

Page 49: Wireless Local Area Networks. The proliferation of laptop computers and other mobile devices (PDAs and cell phones) created an obvious application level.

Fairness Issue

• Observation: unfairness occurs when one node has backed off much more than some other node

A B

C D

Two flows

Page 50: Wireless Local Area Networks. The proliferation of laptop computers and other mobile devices (PDAs and cell phones) created an obvious application level.

MACAW Solution for Fairness

• When a node transmits a packet, it appends its current cw value to the packet

• All nodes hearing that cw value use it for their future transmission attempts

• The effect is to reset all competing nodes to the same ground rule

Page 51: Wireless Local Area Networks. The proliferation of laptop computers and other mobile devices (PDAs and cell phones) created an obvious application level.

Weighted Fair Queueing

• Assign a weight to each node

• Goal: bandwidth used by each node should be proportional to the weight assigned to the node

Page 52: Wireless Local Area Networks. The proliferation of laptop computers and other mobile devices (PDAs and cell phones) created an obvious application level.

Distributed Fair Scheduling (DFS) [Vaidya00Mobicom]

• A fully distributed algorithm for achieving weighted fair queueing

• Key idea: if sender A has weight =1 and sender B has weight = 2, they split the bandwidth 1 to 2

• Choose backoff intervals proportional to(packet size / weight)

• DFS attempts to mimic the centralized Self-Clocked Fair Queueing algorithm [Golestani]

• Works well on a LAN

Page 53: Wireless Local Area Networks. The proliferation of laptop computers and other mobile devices (PDAs and cell phones) created an obvious application level.

Distributed Fair Scheduling (DFS)

data

wait

B1 = 15

B2 = 5

B1 = 15 (DFS actually picks a random value with mean 15)

B2 = 5 (DFS picks a value with mean 5)

Weight of node 1 = 1Weight of node 2 = 3

Assume equalpacket size

B1 = 10

B2 = 5

data

wait

B1 = 5

B2 = 5

Collision !