0% found this document useful (0 votes)
42 views

Chapter 4 - Wireless LANs Part 2 - 16x9

The exponential backoff increases the contention window size exponentially after each collision to reduce the chance of future collisions. If the backoff counter was not frozen when the medium became busy, multiple stations could decrement to 0 at the same time and cause additional collisions when transmitting. Freezing the counter prevents this.

Uploaded by

alomarianas52
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
42 views

Chapter 4 - Wireless LANs Part 2 - 16x9

The exponential backoff increases the contention window size exponentially after each collision to reduce the chance of future collisions. If the backoff counter was not frozen when the medium became busy, multiple stations could decrement to 0 at the same time and cause additional collisions when transmitting. Freezing the counter prevents this.

Uploaded by

alomarianas52
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 34

Wireless Local Area Networks

(Part 2)
Reliable Data Delivery
NES440 Wireless Networks

Dr. Fahed Awad


Department of Network Engineering & Security
Jordan University of Science and Technology

NES440: Wireless Networks Copyright © Dr. Fahed H. Awad 1


Reliable Data Delivery
 The IEEE 802.11 physical and MAC layers are subject to data transfer unreliability due to:
 Noise, interference, and/or other propagation-related effects that may result in loss of frames (i.e.;
drop of an erroneous frame)

 Even with relatively strong error-correction techniques, frames may not be successfully
received (i.e.; error-free)

 This can be dealt with at a higher layer such as the TCP. However:
 The retransmission timers at the higher layers are typically in the order of seconds (i.e.; relatively
long retransmission delay)
 The TCP reliable data transfer was designed to overcome data loss caused by traffic congestion
not due to collisions

 Therefore, it is more efficient to deal with such errors at the MAC level
 The IEEE 802.11 MAC includes a two-way frame exchange protocol:
 When a station receives a frame, it returns an acknowledgment (ACK) frame
 The exchange process is given a high priority and hence cannot be interrupted by any other station
 If no ACK is received within a short period of time, the station retransmits the frame
NES440: Wireless Networks Copyright © Dr. Fahed H. Awad 2
Four-Frame Exchange
 Basic data transfer involves the exchange of two frames (i.e.; the data frame and the ACK
frame)
 To further enhance the reliability of data transfer, a four-frame (or a four-way frame)
exchange may be used such that:
 The source STA sends a Request to Send (RTS) frame to the destination STA
 The destination STA responds with Clear to Send (CTS) frame
 After receiving CTS, the source STA transmits the data
 Upon receiving the data, the destination STA responds with an ACK
 The RTS alerts all STAs within the range of the source STA that an exchange of frames is
about to start
 The CTS alerts all STAs within the range of the destination STA that an exchange of frames
is about to start
 Therefore, the STAs refrain from any transmission for the duration of the frame exchange in
order to avoid collisions
 RTS/CTS exchange is a required function of the MAC sublayer but it may be disabled or
restricted due its associated large overhead

NES440: Wireless Networks Copyright © Dr. Fahed H. Awad 3


Wireless Media Access

NES440: Wireless Networks Copyright © Dr. Fahed H. Awad 4


Wireless Media Access Control
 Sharing a media access among many transmitting
stations in a wireless network is more complex than a
wired network. Why?

 Wired stations can detect collisions by sensing the carrier energy


on the line and abort transmission accordingly
 Therefore, CSMA/CD (Carrier Sense Multiple Access with Collision
Detection) is used in wired MAC’s

 Wireless stations cannot detect a collision because the radio


cannot transmit and receive simultaneously
 Therefore, CSMA/CA (Carrier Sense Multiple Access with Collision
Avoidance) is used in wireless MAC’s

NES440: Wireless Networks Copyright © Dr. Fahed H. Awad 5


IEEE 802.11 MAC Media Access
 The IEEE 802.11 standard defines two MAC sublayer media access
coordination protocols:
 The mandatory DCF (Distributed Coordination Function) protocol
 The optional PCF (Point Coordination Function) protocol

IEEE 802.2

802.11b

NES440: Wireless Networks Copyright © Dr. Fahed H. Awad 6


The 802.11 MAC Coordination Functions
 The lower MAC sublayer is the distributed coordination function (DCF)
 It is a decentralized MAC algorithm
 It is contention-based to provide access to all types of traffic from all stations
 It provides access for asynchronous traffic
 The optional upper MAC sublayer is the point coordination function (PCF)
 It is a centralized polling-based MAC algorithm
 It is a contention-free algorithm that provides access to time-critical type of traffic
 It is built on top of the DCF

IEEE 802.2

802.11b

NES440: Wireless Networks Copyright © Dr. Fahed H. Awad 7


The Interframe Spacing
 The IEEE 802.11 standard defines standard spacing intervals (or time gaps)
between the transmissions of different MAC frames called the interframe
spacing (IFS)
 There are three types of IFS defined for prioritizing media access:
 Short IFS (SIFS): Highest priority
 The shortest IFS
 Used for immediate response actions such as:
 Acknowledgment (ACK)
 Clear to send (CTS)
 Poll response
 Point coordination function IFS (PIFS): Medium priority
 Has a medium length IFS
 Used by the centralized controller in the PCF scheme when using polls
 Takes precedence over the normal contention traffic
 Distributed coordination function IFS (DIFS): Lowest priority
 The longest IFS
 The standard interval between transmission of data frames
 Used as the minimum delay of asynchronous frames contending for channel access
NES440: Wireless Networks Copyright © Dr. Fahed H. Awad 8
The Medium Access Control Logic
 A station with a frame to send should sense the medium status:
1. If it is idle, wait to see if it remains idle for one IFS. If so, may transmit immediately
2. If it is busy (either initially or becomes busy during IFS), the station should defer
transmission and continue to monitor it until the current transmission is over
3. Once the current transmission over, the station should wait another IFS
4. Setup the backoff counter with a random number and keep sensing the medium
5. If the medium remains idle, decrement the backoff counter every slot time. When the
backoff counter reaches zero, the station may start transmitting its frame.
6. During the backoff process, if the medium becomes busy, the backoff timer is halted
and it resumes only if the medium becomes idle again for an IFS duration
7. To ensure stability and adaptation to the number of contending stations, binary
exponential backoff is used such that if the transmission attempt fails, the next random
number is chosen from a larger set.
8. If there is another frame to transmit (or to retransmit), then wait for an IFS and jump to
step 4

NES440: Wireless Networks Copyright © Dr. Fahed H. Awad 9


IEEE 802.11 MAC Timing Basic Access Method

NES440: Wireless Networks Copyright © Dr. Fahed H. Awad 10


The Distributed Coordination Function (DCF)
 Wireless networks cannot use CSMA/CD. Why?
 For collision detection, the station has to be able transmit and receive at
the same time.
 This means costly station design
 Some collisions may not be detected such as:
 Due to the hidden-station problem (to be discussed later)
 The distance can be large enough so that the signal fading would prevent the other
side from hearing the collision
 DCF uses CSMA/CA, a modified version of CSMA/CD, as an
access method
 CSMA/CA attempts to avoid collisions instead of detecting them but it
does not eliminate them
 All stations must wait a random amount of time, measured in slot times,
after the medium is clear
 For example: the IEEE 802.11b slot time is 20μs long. Therefore, if a station has to wait 4 slot
times, then it has to wait 80μs
NES440: Wireless Networks Copyright © Dr. Fahed H. Awad 11
The Exponential Backoff
 It forces the stations to wait for a random amount of time in order to reduce the chance of collision
 The backoff period increases exponentially (i.e.; doubles) after each collision, similar to the Ethernet protocol.
Why?
 If the medium is sensed busy:
 Wait for the medium to be idle for a DIFS period
 Pick a random number from zero to the contention window (CW) in order to initialize the backoff counter.
Initially, CW=1 (but it can be changed by configuration)
 Decrement the backoff counter every slot time until it reaches 0
 However, whenever the medium is sensed busy, freeze the backoff counter. Why?
 When the medium becomes idle again for at least a DIFS period, resume the counting down.
 When the backoff counter reaches 0, transmit the frame
 If there is another frame to send, then repeat the process of deferring and contending before transmitting
 If the backoff timers of two stations expire at the same slot time, a collision will occur causing the transmission
to fail
 After every failed transmission attempt:
 The CW is doubled
 That is, CW = 2i–1, where i is the number of attempts
 CWmin = 1 and CWmax = 1023 (e.g., CW = 1, 3, 7,15, 31, …, 1023)
 What is the maximum possible waiting time a station may have in IEEE 802.11b?
 Answer: 20.5 ms. How?

NES440: Wireless Networks Copyright © Dr. Fahed H. Awad 12


The DCF CSMA/CA Timing without RTS/CTS
 Before transmitting a frame, sense the medium
 If it is idle for one DIFS period, then start transmitting
 If it is busy, then defer until it becomes idle:
 Wait one DIFS period
 Go through the random backoff process, then transmit the frame
 Wait for the ACK
 If it is received within the timeout interval, then you are done with the frame
 Otherwise, retransmit after deferring and contending for the channel using the exponential backoff
(remember: after each failed attempt, the CW is doubled)

NES440: Wireless Networks Copyright © Dr. Fahed H. Awad 13


Example on DCF Timing without RTS/CTS
DIFS DIFS DIFS DIFS
boe bor boe bor boe busy
station1

boe busy
station2

busy
station3

boe busy boe bor


station4

boe bor boe busy boe bor


station5
t

busy medium not idle (frame, ack etc.) boe elapsed backoff time

packet arrival at MAC bor residual backoff time

NES440: Wireless Networks Copyright © Dr. Fahed H. Awad 14


Sending Unicast Frames
 The station waits for DIFS before transmitting the data
 If the frame is received with correct CRC, the receiver responds with an ACK
frame within SIFS
 If no ACK is received within SIFS, the data frame is automatically
retransmitted after deferring and contending
DIFS
data
sender
SIFS
ACK
receiver
DIFS
other data
stations t
waiting time contention

NES440: Wireless Networks Copyright © Dr. Fahed H. Awad 15


IEEE 802.11 DCF Flowchart for Unicast Frames

wo = CW min
m = max. # of attempts
m’ = max. # of doubling CW (m’=10)

NES440: Wireless Networks Copyright © Dr. Fahed H. Awad 16


The Hidden Station Problem
 Station A is within the transmission range of both stations B and C
 Stations B and C are outside the range of each other
 If station B is in the middle of sending a frame to Station A:
 Station C can’t hear station B’s transmission
 Station C has a frame to station A. After a DIFS interval, it will start transmitting the frame to station A causing a
collision at station A
 In this case, we say that station B and C are hidden from each other with respect to Station A
 The hidden station problem increases the probability of packet collision and hence degrades the
performance of the WLAN
 How is this problem solved?

NES440: Wireless Networks Copyright © Dr. Fahed H. Awad 17


The RTS/CTS protocol
 The RTS/CTS handshake can be optionally used to solve the hidden station problem
 Before transmitting, station B sends an RTS frame to station A
 Upon receiving the RTS frame, station A responds with a CTS frame
 Station C (and any other station within the transmission range of station A) hears the CTS frame and hence
refrains from transmitting (and even from sensing the channel) for the whole transmission period
 Each station within the range of station A creates a timer called the network allocation vector (NAV) that shows
how much time it must wait before it can sense the channel again. This is called Virtual Carrier Sensing
 But how does each node know the transmission period?
 The RTS/CTS handshake causes a significant overhead on the WLAN especially with short frames
 To control this problem, the WLAN may restrict the use of CTS/RTS only to the frames that are longer than an
RTS threshold

NES440: Wireless Networks Copyright © Dr. Fahed H. Awad 18


The DCF CSMA/CA Timing with RTS/CTS
 RTS and CTS frames are smaller than data frames and they use shorter IFS than data
frames to guarantee access
 Stations that hear either the RTS or the CTS “remember” that the medium will be busy for the
duration of the transmission
 Based on a Duration field in the RTS and CTS frames

DIFS
RTS data
sender
SIFS SIFS SIFS
CTS ACK
receiver

NAV (RTS) DIFS


other NAV (CTS) data
stations t
defer access contention

NES440: Wireless Networks Copyright © Dr. Fahed H. Awad 19


The DCF Timing Example with RTS/CTS

NES440: Wireless Networks Copyright © Dr. Fahed H. Awad 20


The Exposed Station Problem
 It is the opposite of the hidden station problem
 A station refrains from using the channel when it is available
 Station A is transmitting to station B
 Station C hears station A’s transmission and hence refrains from transmitting a frame to D even though
it can without causing a collision. How?
 The RST/CTS handshake does not solve the exposed station problem
 Station C will not be able to hear the CTS frame from station B

NES440: Wireless Networks Copyright © Dr. Fahed H. Awad 21


Frame Fragmentation
 If the channel is noisy (e.g.; a Bluetooth piconet or a microwave oven is close by), corrupted frames have
to be retransmitted
 The data unit of a large frame is divided into several smaller fragments in order to
 Reduce the probability of packet collision
 Reduce amount of overall time the medium is in use (i.e.; by reducing the retransmissions)
 If the data frame length exceeds a specified threshold, the MAC sublayer fragments it
 The receiving station reassembles the fragments
 However, if the fragments are too small in size or the impact of noise is not very severe, the fragmentation
may degrade the WLAN performance
 It is an alternative collision-reduction option to RTS/CTS, but mostly with relatively higher overhead of ACKs
and additional SIFS periods
 When a station gains access to the channel, it may send all fragments in one burst, where:
 Each fragment is individually acknowledged
 An SIFS is used between fragments and ACKs
 If a fragment is corrupted (i.e.; no ACK is received), the station:
 Releases the medium
 Contends for the medium again
 Starts by retransmitting the unACKed fragments and continues forward
 The RTS/CTS handshake may be used to gain access to the medium for transmitting the fragmented frame

NES440: Wireless Networks Copyright © Dr. Fahed H. Awad 22


Fragmentation Example 1 with RTS/CTS

DIFS
RTS frag1 frag2
sender

SIFS SIFS SIFS


SIFS SIFS
CTS ACK1 ACK2
receiver

NAV (RTS)
NAV (CTS)
DIFS
NAV (frag1)
other data
NAV (ACK1)
stations
t
contention

NES440: Wireless Networks Copyright © Dr. Fahed H. Awad 23


Fragmentation Example 2 with RTS/CTS

NES440: Wireless Networks Copyright © Dr. Fahed H. Awad 24


Synchronization in Infrastructure Mode
beacon interval
(20ms – 1s)

B B B B
access
point

busy busy busy busy


medium
t

value of the timestamp B beacon frame

NES440: Wireless Networks Copyright © Dr. Fahed H. Awad 25


Synchronization in Ad Hoc Mode

beacon interval

B1 B1
station1

B2 B2
station2

busy busy busy busy


medium
t

value of the timestamp B beacon frame random delay

NES440: Wireless Networks Copyright © Dr. Fahed H. Awad 26


Point Coordination Function (PCF)
 The PCF is an alternative contention-free medium access method that is implemented on top of the
DCF in an infrastructure mode
 The PCF is used when the wireless network has a number of stations with time-sensitive traffic that
need to be given higher priority
 The remaining traffic may contend for medium access using CSMA

 The PCF is based on polling the stations by a centralized polling master (called a point coordinator or
PC), which is usually the AP
 The PC polls the intended stations in a round-robin fashion
 When a station is polled, it may respond after an SIFS
 If the PC receives a response, it issues another poll after an SIFS

 The PC uses PIFS (instead of DIFS) to contend for the medium gaining a higher priority than any other
station trying to access the medium
 Due to the higher priority of the PCF over DCF, contention-based traffic may not have access to the
medium during the PCF period
 In order to allow contention-based traffic to access the medium, a repetition interval (also called a
superframe) is used, which allows both types of traffic to access the medium

NES440: Wireless Networks Copyright © Dr. Fahed H. Awad 27


The Superframe (or Repetition Interval)
 At the beginning of the superframe, the PC may seize control and issue polls for a given period, which
may vary because of the variable-size frames issued by stations
 After seizing control of the medium, the PC starts by sending a beacon frame, which carries information
about the duration of the contention-free period (CFP) of the superframe
 All stations with contention-based traffic must set their NAV to the CFP
 At the end of the CFP, the PC sends a “contention-free end” frame in order to allow the contention-based traffic
to use the medium
 At end of the superframe interval, the PC may contend for medium access using PIFS
 If idle, the PC gains immediate access to the medium and a full superframe period follows
 If busy, the PC must wait for the medium to be idle to gain access
 This results in a foreshortened superframe period for the next cycle

NES440: Wireless Networks Copyright © Dr. Fahed H. Awad 28


An Example of a Repetition Interval Timing

ACK is piggybacked on the data or poll frames

NES440: Wireless Networks Copyright © Dr. Fahed H. Awad 29


Quality of Service and IEEE 802.11e
 The DCF does not provide good enough service for real-time or time-sensitive traffic
 The demand for multimedia traffic over WLAN is increasing (e.g.; VoIP over WLAN)
 Quality of Service (QoS): is the capability to prioritize different types of frames
 Wi-Fi Multimedia (WMM) QoS: modeled after a wired network QoS prioritization scheme
 The IEEE 802.11e: defines a superset of features intended to provide QoS over WLANs
 The IEEE 802.11e proposed two new modes of operation for the 802.11 MAC sublayer
 Enhanced Distributed Channel Access (EDCA): Contention-based but for different types of traffic
 It has four access categories (ACs)
 It provides “relative” QoS but cannot guarantee the service
 Hybrid Coordination Function Controlled Channel Access (HCCA):
 It is a new form of PCF that is based on polling
 It serves as a centralized scheduling mechanism

NES440: Wireless Networks Copyright © Dr. Fahed H. Awad 30


Power Management
 The original IEEE 802.11 standard assumes that STAs are always ready to receive frames
and must remain “awake” to receive network transmissions
 But what if STA is idle? Why does it have to continuously consume energy?
 Power management allows STAs to conserve energy without missing frames
 It is transparent to all protocols and applications
 It differs based on the specific WLAN configuration
 AP keeps track of which stations are awake and which are sleeping
 Buffering: if a destination STA is in sleep mode, the AP temporarily stores the received frames
 STA can be configured to one of two power modes:
 Continuous Aware Mode (CAM): STA is always awake and is usually used if STA has a continuous
power source
 Power Save Polling (PSP): STA goes into sleep and awakens with the beacon frames in order to
maintain its synchronization with the AP
 The periodically broadcasted beacon frame by the AP
 Contains Traffic Indication Map (TIM), listing all STAs with buffered frames at AP
 All sleeping STAs periodically switch to listening mode to receive the beacon frames
 If a STA is listed in TIM, it may send a request to AP to forward its frames. Otherwise, it may go
back to sleep
NES440: Wireless Networks Copyright © Dr. Fahed H. Awad 31
Power Management: Ad Hoc Mode
 If a STA attempts to send a frame to a sleeping STA, then it has
to buffer it
 Ad hoc Traffic Indication Message (ATIM) window
 The time at which all STAs must be awake
 The time at which a STA sends a beacon frame to all other STAs
 STAs that previously tried to send frames to a sleeping STA sends an
ATIM frame indicating that the receiving STA has buffered data and must
remain awake

NES440: Wireless Networks Copyright © Dr. Fahed H. Awad 32


Hints to verify your analysis
 Always check the number of active stations on wireless link:
 One active STA communicating via DS
 No collisions, max. performance (Full BW – standard OH)
 N active STAs communicating via DS
 Collisions and Hidden Station, ~ BW / N
 Two active STAs exchanging wireless frames
 In fact, this is 3 active STAs. AP is the third
 Collisions and Hidden Station, ~ BW / 3
 Max. possible performance:
 Max. frame size
 No collisions (if at all avoidable): STAs choose smallest different # for BO
 Average performance:
 Large number of transmitted frames
 Average frame size (unless given otherwise)
 Average BO=CW/2
 Do the analysis for one frame and multiply by the number of frames to get the totals

NES440: Wireless Networks Copyright © Dr. Fahed H. Awad 33


Useful Performance Definitions
 Channel Utilization = Percent of time used for data transmission
 Percent Overhead (%OH) = Any time not used for data transmission
 Throughput = payload size / total time
 Throughput = (1 - %OH) x channel data rate

NES440: Wireless Networks Copyright © Dr. Fahed H. Awad 34

You might also like