EEL 6591, Wireless Networks

You might also like

Download as ppt, pdf, or txt
Download as ppt, pdf, or txt
You are on page 1of 60

- EEL 6591, Wireless Networks -

Lecture 10

Wireless Ethernet

3/24/2010

Spring 2010

1
Overview
 Protocol Architecture
 MAC in wireless networks
 CSMA
 Hidden and Exposed Terminals
 MACA
 MACAW
 IEEE 802.11

2
References
 Wireless Communications and Networks, by W.
Stallings, chapter 14
 P. Karn, “MACA-A new channel access method for
Packet Radio”, Amateur Radio 9th Computer
Networking Conference, Sept 1990
 V. Bhargavan, A. Demers, S. Shenker and L. Zhang,
“MACAW: A media access protocol for wireless
LANs”, Proceedings of ACM SIGCOMM ’94.

3
4
5
Protocol Architecture

 Functions of physical layer:


 Encoding/decoding of signals
 Preamble generation/removal (for
synchronization)
 Bit transmission/reception
 Includes specification of the transmission
medium

6
Protocol Architecture

 Functions of medium access control (MAC) layer:


 On transmission, assemble data into a frame with
address and error detection fields
 On reception, disassemble frame and perform address
recognition and error detection
 Govern access to the LAN transmission medium
 Functions of logical link control (LLC) Layer:
 Provide an interface to higher layers and perform flow
and error control

7
Separation of LLC and MAC
 The logic required to manage access to a
shared-access medium not found in
traditional layer 2 data link control
 For the same LLC, several MAC options
may be provided

8
MAC Frame Format
 MAC control
 Contains Mac protocol information
 Destination MAC address
 Destination physical attachment point
 Source MAC address
 Source physical attachment point
 CRC
 Cyclic redundancy check

9
Logical Link Control
 Characteristics of LLC not shared by other
control protocols:
 Must support multiaccess, shared-medium
nature of the link
 Relieved of some details of link access by
MAC layer
LLC Services
 Unacknowledged connectionless service
 No flow- and error-control mechanisms
 Data delivery not guaranteed
 Connection-mode service
 Logical connection set up between two users
 Flow- and error-control provided
 Acknowledged connectionless service
 Cross between previous two
 Datagrams acknowledged
 No prior logical setup
Medium Access Control in Wireless
Networks
Medium Access Control in WN

 The wireless medium is a scarce resource


 The access to the wireless medium is
broadcast in nature
 It is necessary to share this resource efficiently
and effectively in a fair manner among the
various nodes that require this resource

13
MAC protocols

 defines a set of rules for the orderly access of a


shared media wireless channel by multiple
devices
 a set of services that support real-time voice
and video, reliable delivery of data
 performance metrics: delay, throughput,
fairness, robustness against channel fading,
power consumption, support for multimedia

14
Basic MAC mechanisms
 Fixed Allocation
 TDMA, FDMA – allocate a share of the available
bandwidth permanently to users.
 not scalable; wasteful with idle users
 Dynamic Allocation (with Reservations)
 Difficult to do in a distributed setting.
 Requires a lot of coordination
 Synchronization between nodes is difficult.

15
Basic MAC mechanisms

 Random Access Methods


 Contention-based
 Aloha
 Carrier Sense Multiple Access (CSMA)
 Token Passing is not feasible
 Token broadcast is expensive
 Token restoration has high overhead
 Ring maintenance high with mobile nodes

16
Random Access MAC Methods

17
Some Key Concepts
A B C
Frames from A and C
collide at B.

 COLLISIONS: When two or more transmissions are


received at the same time, it is said that there is a
collision at the receiver
 Note that the two transmissions ought to be with

the same frequency and at the same time


18
Some Key Concepts

 CAPTURE: If the signal strength of one of the


signals is sufficiently larger than that of another, this
signal could potentially be captured at the receiver
 Overlapping signals are “noise”

 Minimum SNR (i.e. E /N ) needed for


b 0
demodulation, FEC, decoding

19
Some Key Concepts

 INTERFERENCE: receiver is in the range of


transmitter, but is unable to cleanly receive the signal
because of the interfering presence of other signal
 CARRIER: frequency carrier upon which the data
is modulated.
 For the purposes of this discussion we ignore capture
and interference – only collisions.

20
Model
 Any two stations are either in-range or out-
of-range of one another
 A station successfully receives a packet if
and only if there is only one active
transmitter within its range
 Symmetric model: if a station A can hear a
station B, then B can hear A

21
CSMA- Carrier Sense Multiple Access
 Every node senses the channel before initiating
a transmission
 A station can transmit only if the medium is
idle; otherwise wait until current transmission
complete
 Carrier sense is testing the signal strength at
the transmitter. However, collisions happens at
receiver not transmitter !
 Used with the Exponential back-off scheme

22
Exponential back-off scheme
 Backoff Time is a pseudorandom integer
uniformly distributed in [0, BO]
 BOmin ≤ BO ≤ BOmax
 The back-off (BO) parameter takes initially
the value BOmin
 After an unsuccessful attempt,
BO = min( f×BO, BOmax)

 If f=2  Binary exponential backoff


algorithm 23
Hidden Terminal Problem

A B C D

 A is transmitting to B
 C senses the channel – no idea A is

transmitting
 C initiates transmission to D (or B)

 Collision at B !

A and C are ‘hidden’ from each other 24


Exposed Terminal Problem

A B C D

 B is transmitting to A
 C could potentially transmit to D but does not:
C senses the channel and hears an ongoing
transmission
 C is ‘exposed’ to B
 Loss in throughput !
25
MACA: Multiple Access with Collision Avoidance

 No carrier sensing !
 Exchange of two short messages, of fixed size
 RTS (Request to Send)
 CTS (Clear to Send)

26
MACA: Multiple Access with Collision Avoidance

If A wants to send a frame to B:


 A sends RTS containing duration of proposed

transmission
 B responds with CTS also containing duration

of proposed communication
 Upon CTS receipt, A begins transmission

27
MACA

 Any station hearing RTS from A must


remain silent for the CTS to be sent to A
 Any station hearing CTS, must remain
silent during the upcoming data
transmission

28
MACA
RTS
C A CTS B D
DATA

Exposed and hidden terminal scenarios:


 C hears RTS and as long as it not interfere

with CTS, C can transmit, while data frame


is sent from A to B
 D and E hear CTS and must be silent during

data transmission from A to B


29
MACA

Collisions may occur:


 B and C could send RTS to A at the same

time
 If A does not receive CTS , it will time-out

and uses binary exponential backoff to select


retransmission time

30
MACAW – MACA for Wireless LANs

Design criteria:
 The MAC protocol should yield high
network utilization
 It should provide fair access to the media
 These are in some sense contradicting
features

31
Reliability in MACAW
 In MACA, no concept of reliability at the link layer.
MACA relies on a higher layer (TCP) to make error
recovery
 In MACAW, an additional ACK is added to provide
link layer reliable data transmission:
RTS/CTS/DATA/ACK
 if data is sent successfully, but ACK is not, when
RTS is retransmitted, the receiver returns ACK
(instead of CTS)
 Sender  backoff when no CTS or ACK received
 Sender  backoff when receives ACK
32
IEEE 802.11
 The 802.11 standard provides MAC and PHY
functionality for wireless connectivity of fixed,
portable and moving stations moving at
pedestrian and vehicular speeds within a local
area.
 The 802.11 standard takes into account the
following significant differences between
wireless and wired LANs:
 Power Management
 Security
 Bandwidth
 Addressing 33
IEEE 802.11 Physical layer

 802.11 defines physical media:


 DSSS, 2.4 GHz ISM band
 FHSS, 2.4 GHz ISM band
 OFDM, 2.4 GHz ISM band
 OFDM, 3.7 GHz licensed band
 OFDM, 5 GHz ISM band
 Infrared, wavelength 850-950 nm; range < 20 m

34
IEEE 802.11 Physical layer
 Standards:
 IEEE 802.11, 1997, 1 / 2 Mbps, 2.4 GHz, FHSS/DSSS,
range 20/100 m
 IEEE 802.11b, 1999, 1,2,5.5,11 Mbps, 2.4 GHz,
DSSS, range 38/140 m
 IEEE 802.11a, 1999, 6-54Mbps, 5 GHz, OFDM, range
35/120 m
 IEEE 802.11g, 2003, 54 Mbps, 2.4 GHz,
DSSS/OFDM, range 38/140 m
 IEEE 802.11y(a), 2008, 6-54 Mbps, 5 GHz, OFDM,
range -/5000 m
 IEEE 802.11n, 2009, 7.2-150 Mbps, 2.4/5 GHz,
OFDM, range 70/250 m
35
IEEE 802.11 Architecture

STA=station 36
IEEE 802.11 Architecture
 Basic Service Set (BSS) – smallest component
 Has at least 2 stations (STA), competing for

medium access
 May be isolated, or connected to a backbone

distribution system (DS) through an access


point (AP)
 Two BSSs can overlap

 association STA – BSS is dynamic

 DS can be a switch, a wired or wireless network


 AP functions like a bridge

37
IEEE 802.11 Architecture
 Independent BSS (IBSS)
 An ad-hoc network
 Extended Service Set (ESS)
 Large coverage networks of arbitrary size and
complexity
 Consists of two or more BSSs interconnected by
APs and a DS, such as Ethernet
 Used for campus/corporate intranets, e.g. FAU

38
IEEE 802.11 MAC Layer

Primary operations
 reliable data delivery
 accessing the wireless medium
 security

39
Association-Related Services
 Association
 Establishes initial association between station and AP
 Reassociation
 Enables transfer of association from one AP to another,
allowing station to move from one BSS to another
 Disassociation
 Association termination notice from station or AP
Access and Privacy Services

 Authentication
 Establishes identity of stations to each other
 Deathentication
 Invoked when existing authentication is
terminated
 Privacy
 Prevents message contents from being read by
unintended recipient
Reliable Data Delivery

Data transfer mechanisms: 2 / 4 frame protocols:


 Two-frame exchange protocol:
 when a STA receives a frame, it returns an
acknowledgement (ACK)
 If the source does not receive an ACK within a
specific time, it retransmit the frame
 ACK requirement can be disabled

42
Reliable Data Delivery
 Four-frame exchange protocol (CSMA/CA)
 source first sends request to send (RTS) frame

 dest responds with clear to send (CTS) frame

 source transmit data frame

 dest responds with ACK

 It derives from MACA and MACAW


 RTS/CTS is optional (may be disabled)
 each message in the dialog contains duration
information for the remainder of the dialog
 RTS ( CTS) alerts all STA within transmission range of
the source (dest) that an exchange is under way
43
CSMA/CA
If a STA has data to send, then it listens to the medium
If medium is idle, then may tx; otherwise wait until current
transmission ends.

C knows B is listening
A RTS
B C
CTS to A. Will not attempt to
Data transmit to B.
ACK

Hidden Terminal Problem Solved


through RTS-CTS exchange!
Can there be collisions?
• Control packet collisions (C transmitting RTS at the
same time as A)
• C does not register B’s CTS
• C moves into B’s range after B’s CTS 44
IEEE 802.11 MAC layer

45
IEEE 802.11 - MAC layer
Wireless medium access:
 Distributed Coordination Function (DCF) mode
 Fundamental, contention-based access method.
Implemented for use with both ad hoc and infrastructure
networks
 Point Coordination Function (PCF) mode
 Optional, contention-free access method usable only on
infrastructure networks.
 centralized access protocol, requires one node to
function as a polling master. This node is called the
point coordinator (PC).
Both the DCF and PCF can operate concurrently
within the same BSS to provide alternative
contention and contention-free periods
46
The DCF Carrier Sensing
 Virtual carrier sense implemented using a network
allocation vector (NAV).
 The NAV at each node is set to indicate the
remaining time before the medium is expected to
become idle.
 The NAV is updated based on duration information
contained in overheard messages.
 Actual carrier sense combines the NAV state, the
node’s transmission status and the physical carrier
sense indication from the physical layer.

47
MAC logic

Fig 14.6 - textbook 48


Interframe space (IFS)
- Provides a priority-based medium access
• SIFS : used by ACK, CTS, poll response
• PIFS : used by PC when issuing polls, precedence over DIFS
• DIFS : used by ordinary asynchronous traffic

49
Basic Medium Access under the DCF

RTS/CTS/data/ACK and NAV setting ( 802.11 Standard)


50
IEEE 802.11 - PCF
 is an optional capability
 provides contention free frame transfer
 PC performs polling, enabling polled STAs to
transmit without contention
 PCF and DCF can operate concurrently
 PIFS < DIFS  PC has priority in acquiring the
medium !
 Solution: organize the medium access in ‘CFP
repetition Intervals’ (or superframes) containing:
 Contention-Free Period (CFP) (for PCF)
 Contention Period (CP) (for DCF)
51
MAC Frame Format
MAC Frame Fields
 Frame Control – frame type, control information
 Duration/connection ID – channel allocation time
 Addresses – context dependant, types include
source and destination
 Sequence control – numbering and reassembly
 Frame body – MSDU or fragment of MSDU
 Frame check sequence – 32-bit CRC
Frame Control Fields
 Protocol version – 802.11 version
 Type – control, management, or data
 Subtype – identifies function of frame
 To DS – 1 if destined for DS
 From DS – 1 if leaving DS
 More fragments – 1 if fragments follow
 Retry – 1 if retransmission of previous frame
Frame Control Fields
 Power management – 1 if transmitting station is in
sleep mode
 More data – Indicates that station has more data to
send
 WEP – 1 if wired equivalent protocol is
implemented
 Order – 1 if any data frame is sent using the
Strictly Ordered service
Control Frame Subtypes
 Power save – poll (PS-Poll)
 Request to send (RTS)
 Clear to send (CTS)
 Acknowledgment
 Contention-free (CF)-end
 CF-end + CF-ack
Data Frame Subtypes
 Data-carrying frames
 Data
 Data + CF-Ack
 Data + CF-Poll
 Data + CF-Ack + CF-Poll
 Other subtypes (don’t carry user data)
 Null Function
 CF-Ack
 CF-Poll
 CF-Ack + CF-Poll
Management Frame Subtypes
 Association request
 Association response
 Reassociation request
 Reassociation response
 Probe request
 Probe response
 Beacon
CFP/CP alternation

• CFP is initiated by PC sending a beacon (B)


• all stations in BSS update NAV with length (PCF)

59
PCF medium access during CFP

During CFP, a STA can transmit:


• in response to a poll from the PC
• ACK after the receipt of a frame
60

You might also like