• No results found

Wireless Local Area Networks (Part 2) Reliable Data Delivery

N/A
N/A
Protected

Academic year: 2021

Share "Wireless Local Area Networks (Part 2) Reliable Data Delivery"

Copied!
30
0
0

Loading.... (view fulltext now)

Full text

(1)

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

(2)

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

(3)

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

(4)

Wireless Media Access

(5)

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 between its transmission and another station’s transmission since the radio cannot transmit and

receive simultaneously

Therefore, CSMA/CA (Carrier Sense Multiple Access with Collision Avoidance) is used in wireless MAC’s

 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

(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

802.11b

IEEE 802.2

(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)

The shortest IFS

Used for immediate response actions such as:

Acknowledgment (ACK)

Clear to send (CTS)

Poll response

 Point coordination function IFS (PIFS)

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)

The longest IFS

The standard interval between transmission of data frames

Used as the minimum delay of asynchronous frames contending for channel access

(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

(9)

IEEE 802.11 MAC Timing Basic Access Method

(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

(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 timer every slot time until it reaches 0

However, whenever the medium is sensed busy, freeze the backoff counter. Why?

When the medium become 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

CW

min

= 1 and CW

max

= 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?

(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)

(13)

Example on DCF Timing without RTS/CTS

t busy

bo

e

station

1

station

2

station

3

station

4

station

5

packet arrival at MAC DIFS

bo

e

bo

e

bo

e

busy

elapsed backoff time bo

r

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

bo

r

bo

r

DIFS

bo

e

bo

e

bo

e

bo

r

DIFS

busy

busy

DIFS

bo

e

busy

bo

e

bo

e

bo

r

bo

r

(14)

Sending Unicast Packets

 The station waits for DIFS before transmitting the data

 If the packet 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

t SIFS

DIFS

data ACK

waiting time other

stations receiver

sender data

DIFS

contention

(15)

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?

(16)

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 CTS/RTS 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

(17)

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

t SIFS

DIFS

data ACK

defer access other

stations receiver

sender data

DIFS

contention RTS

SIFS CTS SIFS

NAV (RTS)

NAV (CTS)

(18)

The DCF Timing Example with RTS/CTS

(19)

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

(20)

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

(21)

Fragmentation Example 1 with RTS/CTS

t SIFS

DIFS

data ACK

1

other stations receiver

sender frag

1

DIFS

contention RTS

SIFS CTS SIFS

NAV (RTS)

NAV (CTS)

NAV (frag

1

)

NAV (ACK

1

) SIFS

ACK

2

frag

2

SIFS

(22)

Fragmentation Example 2 with RTS/CTS

(23)

Synchronization in Infrastructure Mode

beacon interval (20ms – 1s)

t medium

access point

busy B

busy busy busy

B B B

value of the timestamp B beacon frame

(24)

Synchronization in Ad Hoc Mode

t medium

station

1

busy B

1

beacon interval

busy busy busy

B

1

value of the timestamp B beacon frame

station

2

B

2

B

2

random delay

(25)

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

(26)

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

(27)

An Example of a Repetition Interval Timing

ACK is piggybacked on the data or poll frames

(28)

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

(29)

Power Management

The original IEEE 802.11 standard assumes that the stations are always ready to receive network messages and must remain “awake” to receive network

transmissions

But what if the station is idle? Why does it have to continuously consume energy?

Power management allows mobile devices to conserve battery life without missing network transmissions

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 station is in sleep mode, the AP temporarily stores the received frames

The station can be configured to one of two power modes:

Continuous Aware Mode (CAM): the station is always awake and is usually used if the station has a continuous power source

Power Save Polling (PSP): the station 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 the Traffic Indication Map (TIM), which lists all the stations that have frames buffered by the AP

All sleeping stations periodically switch into active listening mode in order to receive the beacon frames

If a station is listed in the TIM, it may send a request to the AP to forward its frames.

Otherwise, it may go back to sleep

(30)

Power Management: Ad Hoc Mode

 If a station attempt to send a frame to a sleeping station, then it has to buffer it

 Ad hoc Traffic Indication Message (ATIM) window

 The time at which all stations must be awake

 The time at which a station sends a beacon frame to all other stations

 Devices that previously tried to send a frame to a sleeping device

will send an ATIM frame indicating that the receiving device has

data to receive and must remain awake

References

Related documents

Fennemore Craig represents large and small business entities and individuals in commercial disputes in federal and state court, including cases involving fraud, RICO, derivative

Early research in Hepatitis C virus was hindered by an inability to achieve the complete virus life cycle in a single system; workarounds included using bi-cistronic

All estimations were carried out by means of the SpaceStat 1.91 software (Anselin, 1995b)... of dissimilar values and belong to the quadrants HL or LH. The pattern of association LH

Tax equity – positive concept, but insignificant compared to the economic growth issue Research points to CGT undermining savings, capital formation, growth and development CGT

of original Avro Aircraft colour film footage, coverage includes design, free flight models, construction, ejector seat testing, taxi trials, Arrow's first flight,

The RTS control frame is first transmitted by the source station (after success- fully contending for the channel) with a data or man- agement frame queued for transmission to

Distributed Coordinated Function DIFS DIFS DIFS DIFS FRAME Station A FRAME FRAME Defer Defer Station B Station C FRAME FRAME Defer Defer Station D FRAME Defer Station E.. PCF: