You are on page 1of 6

Lecture Objectives

Wireless Networks and Mobile Systems ● Discuss how access to the wireless medium is
decided in IEEE 802.11 and Bluetooth networks
● Identify the hidden node and exposed node problems
and how the exchange of control messages can be
Lecture 3 used to mitigate them
● Describe the frame formats for IEEE 802.11 and
Medium Access in WLAN Bluetooth
environment

Medium Access in WLANs 2

Agenda
IEEE 802.11 Medium Access
● IEEE 802.11
■ MAC frame format
■ CSMA/CA
■ RTS/CTS ● MAC frame format
■ IEEE 802.11e
● CSMA/CA
● Bluetooth
■ Packet format ● RTS/CTS
■ Links and connection establishment ● IEEE 802.11e

Medium Access in WLANs 3

IEEE 802.11 Reference Model MAC Frame Format

Bytes: 2 2 6 6 6 2 6 0-2312 4
Frm Dur/ Adr Adr Adr Seq Adr Frame
FCS
Data Link Medium Access Control MAC sublayer Cntl ID 1 2 3 Cntl 4 Body
Layer (MAC) sublayer management

Physical Layer
station 2 bits 2 bits 4 bits
convergence procedure
Physical management
(PLCP) sublayer PHY sublayer Protocol
Layer Byte 1 Type Subtype
Physical medium management Version
Dependent (PMD)
sublayer 1 1 1 1 1 1 1 1
To From More Power More
Byte 2 Retry WEP Order
DS DS Frags Mgmt Data

Medium Access in WLANs 5 Medium Access in WLANs 6

1
Frame Control Field (1) Frame Control Field (2)
● Protocol Version (2 bits) – current version of the ● To/from DS (1 bit each) – flags set when the frame is
standard sent to/from the distribution system
● Type (2 bits) – differentiates among a management ● More Fragment (1 bit) – flag set when more fragments
frame (00), control frame (01), or data frame (10) belonging to the same frame are to follow
● Retry (1 bit) – indicates that this frame is a
● Subtype (4 bits) – further defines the type of frame
retransmission
■ Type 00, subtype 0000 – association request
● Power Management (1 bit) – indicates power
■ Type 00, subtype 0001 – association response
management mode (active, power saving)
■ Type 01, subtype 1011 – RTS
● More data (1 bit) – more frames buffered by station
■ Type 01, subtype 1100 – CTS
for the same destination
■ Type 01, subtype 1101 – ACK
● WEP (1 bit) – payload encrypted with WEP
■ Type 10, subtype 0000 – data
● Order (1 bit) –strictly-ordered service
■ Many others…

Medium Access in WLANs 7 Medium Access in WLANs 8

Other Fields Address Fields


● Duration ID (2 bytes) – for data frames, it contains the
duration of the frame ToDS FromDS Addr.1 Addr. 2 Addr.3 Addr. 4
● Sequence control (2 bytes) – sequence #
0 0 DA SA BSSID N/A
● Frame body (0 to 2312 bytes)
● FCS (4 bytes) – Frame Check Sequence (32 bit CRC) 0 1 DA BSSID SA N/A
● Address fields (6 bytes each) – may contain BSSID,
source/destination address, transmitting/receiving 1 0 BSSID SA DA N/A
station address
■ Interpretation depends on values of ToDS/FromDS bits 1 1 RA TA DA SA

Medium Access in WLANs 9 Medium Access in WLANs 10

Indirection by Distribution System PHY


Distribution System (DS) ● MAC Protocol Data Unit (MPDU) is encapsulated by
PLCP
AP1 AP2 ● Format of PLCP PDU different for IEEE 802.11 (DSSS,
FHSS, IR), IEEE 802.11b (long preamble/short
STA1 STA3 STA4 STA6
preamble), IEEE 802.11a
STA2 STA5 ■ PLCP PDU for IEEE 802.11b with long preamble compatible
BSS1 BSS2 with PLCP PDU for IEEE 802.11 DHSS
■ In this lecture, we will focus on IEEE 802.11b PLCP PDU
SA = STA2 SA = STA2
DA = STA5 DA = STA5
TA = STA2 TA = AP2
RA = AP1 RA = STA5
Medium Access in WLANs 11 Medium Access in WLANs 12

2
802.11b Long Preamble PLCP PDU 802.11b Short Preamble PLCP PDU
PLCP PDU (PPDU)
PLCP PDU (PPDU)
128 16 8 8 16 8 58 16 8 8 16 8
SYNC SFD Signal Service Length CRC MPDU
SYNC SFD Signal Service Length CRC MPDU
PLCP PLCP
PLCP PLCP
Preamble Header
Preamble Header
● Compatible with legacy IEEE 802.11 systems
● Preamble (SYNC + Start of Frame Delimiter) allows receiver to ● Not compatible with legacy IEEE 802.11 systems
acquire the signal and synchronize itself with the transmitter
● Signal identifies the modulation scheme, transmission rate
● Length specifies the length of the MPDU (expressed in time to
transmit it)

Medium Access in WLANs 13 Medium Access in WLANs 14

802.11 Medium Access Why not use CSMA/CD?


● Distributed Coordination Function (DCF) ● In IEEE 802.3 (Ethernet), nodes sense the medium,
■ Stations contend for the medium and transmit when the transmit if the medium is idle, and listen for
medium becomes idle collisions
■ Mandatory in 802.11 standard ■ If a collision is detected, after a back-off period, the node
● Point Coordination Function (PCF) retransmits the frame
■ Works in conjunction with DCF ● Collision detection is not feasible in WLANs
■ Optional ■ Node cannot know whether the signal was corrupted due to
■ Access point polls stations during contention free periods channel impairments in the vicinity of the receiving node
and grants access to individual station ● IEEE 802.11 uses Carrier Sense Multiple Access
(CSMA), but adopts collision avoidance, rather than
collision detection

Medium Access in WLANs 15 Medium Access in WLANs 16

CSMA Network Allocation Vector (NAV)


● Station waits a random amount of time before ● Counter maintained by each station with amount of
transmitting, while still monitoring the medium time that must elapse until the medium will become
■ Avoids collisions due to multiple stations transmitting free again
immediately after they sense the medium as idle ■ Contains the time that the station that currently has the
● Loss of throughput due to the waiting period is medium will require to transmit its frame
compensated by fewer retransmissions ■ Station cannot transmit until NAV is zero

● No explicit collision detection ● Each station calculates how long it will take to
■ Retransmissions are triggered if ACK is not received transmit its frame (based on data rate and frame
■ Exponential backoff similar to IEEE 802.3 length); this information is included in the Duration
● Optionally, transmitting and receiving nodes can
field of the frame header
■ This information is used by all other stations to set their NAV
exchange control frames to “reserve” the channel

Medium Access in WLANs 17 Medium Access in WLANs 18

3
Timeline Timeline Discussed
Starts sensing the Cwin = contention window
● DCF = Distributed Coordinated Function
medium (idle)
time ■ Basic access method for 802.11 (uses CSMA/CA)
Source Data
● DIFS = DCF Inter Frame Space
SIFS ■ Stations must listen to an idle medium for at least that
DIFS
amount of time before transmitting
Destination ACK ● SIFS = Short Inter Frame Space
■ Period between reception of the data frame and transmission
DIFS of the ACK
■ SIFS < DIFS
Another Data
station ● What happens if another station starts listening to
the medium exactly during the idle period between
Defers access Pick random backoff
time in [0, Cwin] data transmission and acknowledgment?

Medium Access in WLANs 19 Medium Access in WLANs 20

Hidden Node Problem Exposed Node Problem


Range of transmission/reception
of node A
RD RA
RA RC transmission
transmission

Node D Node A Node B Node C


Node B

Node A Node C

● Node B wants to transmit to node C but mistakenly


● Node A is not aware that node B is currently busy
thinks that this will interfere with A’s transmission to
receiving from node C, and therefore may start its
own transmission, causing a collision D, so B refrains from transmitting (loss in efficiency)
Medium Access in WLANs 21 Medium Access in WLANs 22

RTS/CTS Timeline with RTS/CTS


Starts sensing the Cwin = contention window
1. Sender transmits a Request to Send (RTS) indicating
medium (idle)
how long it wants to hold the medium
RTS Data time
2. Receiver replies with Clear to Send (CTS) echoing Source
expected duration of transmission SIFS SIFS SIFS
DIFS
3. Any node that hears the CTS knows it is near the
receiver and should refrain from transmitting for that Destination CTS ACK
amount of time DIFS
4. Nodes that hear the RTS but not the CTS are free to
transmit Another RTS
station
5. Receiver sends ACK to sender after successfully
Pick random backoff
receiving a frame. All nodes must wait for the Defers access
time in [0, Cwin]
receiver to ACK before attempting to transmit
Medium Access in WLANs 23 Medium Access in WLANs 24

4
IEEE 802.11e Service Differentiation
● MAC enhancements to support quality of service
(QoS) in IEEE 802.11a/b/g
● Defines different categories of traffic
● Each QoS-enabled station marks its traffic according
to its performance requirements
● Stations still contend for the medium, but different
traffic types are associated with different inter frame
spacing and contention window
● Qualitative, comparative QoS (no “guarantees”)
Source: Xtreme Spectrum, “Tradeoff Analysis (802.11e versus 802.15.3
QoS mechanism),” white paper, July 2002.

Medium Access in WLANs 25 Medium Access in WLANs 26

Packet Format
Bluetooth

● Packet format
● Links and connection establishment ● Packets may consist of
■ Access code only (in which case the access code is 68 bits,
not 72)
■ Access code + header
■ Access code + header + payload
● Note: discussion of BT MAC follows v.1.1 core
specifications

Medium Access in WLANs 28

Access Code Header (1)


● Access code is used for synchronization and
identification
● All packets sent in a piconet use the same channel
access code
● AM_ADDR:
● There are specific access codes for signaling and
inquiry (for instance, to discover what other BT ■ 3-bit slave address
devices are in range) ■ temporary, assigned while the slave is active, and
specific to the piconet
■ Messages from slave to master and from master to
slave carry this address
■ All zeros: broadcast address

Medium Access in WLANs 29 Medium Access in WLANs 30

5
Header (2) Header (3)

● TYPE:
● SEQN:
■ Distinguishes between synchronous and
■ Sequence number
asynchronous links, indicates how many slots the
packet will occupy ■ 1 bit is sufficient for very simple ARQ
● FLOW: ● HEC:
■ Asynchronous flow control in asynchronous links ■ Header error check
● ARQN:
■ ACK (ARQN = 1) or NAK (ARQN = 0)

Medium Access in WLANs 31 Medium Access in WLANs 32

Types of Links Establishing a Connection


● Synchronous Connection-oriented link (SCO) ● Inquiry and paging procedures
■ Point-to-point ● Inquiry is used for a unit to discover what other BT
■ Reserves duplex slots at regular intervals (“circuit- units are in range and what their addresses are
switched”)
■ Inquiry has a unique device address and a unique set of hop
■ Synchronous and symmetric frequencies
● Asynchronous Connectionless Link (ACL) ■ Devices perform Inquire scans
■ Used in slots that are not reserved for SCO links (“packet- ● Paging procedure establishes the connection
switching)
■ Unit that establishes the connection carries out a paging
■ These slots can be used by the master to broadcast packets procedure and automatically becomes the master
■ Master scheduling (polling)
■ Asynchronous, can be asymmetric

Medium Access in WLANs 33 Medium Access in WLANs 34

Forming a Scatternet
● A master or slave in one
piconet can become the
slave in another piconet
by being paged by the
master in that piconet
● Example: the master of
piconet 2 is a slave in
piconet 3
● Details not yet defined in
BT specifications

Medium Access in WLANs 35

You might also like