Скачиваний:
17
Добавлен:
02.04.2015
Размер:
9.02 Mб
Скачать

3.3 Medium Access Control

 

 

 

 

 

 

25

Management frame (beacon, association, authentication)

 

 

 

 

 

 

bytes:

2

2

6

6

6

2

0-2304 (2312 with WEP)

4

 

 

 

fields:

Frame

Dur./

DA

SA

BSS ID

Seq.

 

Frame

FCS

 

 

 

Control

ID

Control

 

Body

 

 

 

Data frame

 

MAC header

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

bytes:

2

2

6

6

6

2

6

0-2304 (2312 with WEP)

4

 

fields:

Frame

Dur./

addr 1

addr 2

addr 3

Seq.

addr 4

Frame

 

 

FCS

 

Control

ID

Control

Body

 

 

 

 

 

 

 

 

 

 

 

 

MAC header

Control frame (RTS)

 

 

 

bytes:

2

2

6

6

4

fields:

Frame

Dur./

RA

TA

FCS

Control

ID

 

 

 

 

MAC header

Control frame (CTS, ACK)

bytes:

2

2

6

4

fields:

Frame

Dur./

RA

FCS

Control

ID

 

 

 

MAC header

DA/SA: Destination / Source Address

RA/TA: Receiving station / Transmitting Station Address

Figure 3.4: 802.11 frame format.

3.3Medium Access Control

The 802.11 MAC protocol is built with the help of two coordination functions (see Figure 3.5). The two coordination functions are the Distributed Coordination Function (DCF) for asynchronous services and the Point Coordination Function (PCF) for contention free services. They are discussed in the following.

3.3.1Distributed Coordination Function

The 802.11 MAC protocol is briefly described in this section. Its limitations in QoS support are shown. An infrastructure based Basic Service Set (BSS) of IEEE 802.11 wireless LAN is mainly considered, which is composed of an AP and a number of stations associated with the AP, as explained previously. The AP connects its stations with the infrastructure.

The basic 802.11 MAC protocol is the Distributed Coordination Function (DCF) that works as a listen-before-talk scheme, based on the Carrier Sense Multiple Access (CSMA) (Bertsekas and Gallager 1992). Stations deliver MAC Service Data Units (MSDUs) of arbitrary lengths (up to 2304 byte), after detecting that there is no other transmission in progress on the radio channel.

The channel sensing function is called Clear Channel Assessment (CCA). It uses a single fixed power threshold, which is -82 dBm according to 802.11, but may be implementation dependent.

26

3. IEEE 802.11

Contention Free

Services

Point Coordination

Asynchronous

Function (PCF)

Services

Distributed Coordination Function (DCF)

Figure 3.5: 802.11 coordination functions, DCF and PCF.

If the station detects a signal with power larger than this threshold, the radio channel is assumed to be busy and thus unavailable for transmission. Otherwise, the radio channel is assumed to be idle. The Network Allocation Vector (NAV) is an addition to the physical sensing of the radio channel. It is used as a means of virtual carrier sensing an in fact has the function of reserving the channel for the time duration it is indicating. The NAV is a timer, which is continuously decremented irrespective of the status of the radio channel.

The NAV is set when a frame is received that includes a duration field that defines how long the following frame exchange may take. As long as the NAV is set or the CCA sensed the radio channel as being busy, a station is not allowed to initiate transmissions. Thus, upon frame reception, the NAV can be eventually set for a duration that is longer than the transmission duration of this frame, and subsequent frame transmissions will be protected.

Each successful reception is acknowledged by the receiving station, as indicated in Figure 3.6. The addressed station transmits an Acknowledgement (ACK) immediately after receiving a frame. The time between two MAC frames is called Interframe Space (IFS). 802.11 defines four different IFSs.

 

first unsuccessful

 

second unsuccessful

successful MSDU

 

MSDU Delivery attempt

MSDU Delivery attempt

Delivery attempt

station 1

DATA

 

DATA

DATA

station 2

 

 

ACK

ACK

 

corrupted DATA

although station 2 acknowledges the

time

 

 

successful reception, station 1

 

frame, no ACK

retransmit the DATA frame because of

 

the failed transmission of the ACK frame

Figure 3.6: Frame exchange. Successful receptions are acknowledged by the receiving station.

3.3 Medium Access Control

27

Short Interframe Space (SIFS), Point Coordination Function Interframe Space (PIFS) and Distributed Coordination Function Interframe Space (DIFS) are used under normal conditions and represent three different priority levels for medium access. The shorter the IFS, the higher is the priority in medium access. The fourth IFS, called Extended Interframe Space (EIFS), is used when a station detects an on-going transmission as being interfered, assuming that there are some stations that cannot detect each other. A hidden station scenario is then assumed, and the station has to defer from channel access for a longer time.

All interframe spaces are independent of the channel data rate. Due to the different characteristics of the different PHY specifications, the durations of the interframe spaces depend on the used transmission scheme.

The relations between the IFS and the duration aSlotTime (also referred to as slot time) are shown in Figure 3.7. In the following, the durations are listed in order, from shortest to longest.

aSlotTime:

The duration aSlotTime is used to calculate the IFSs. SIFS and

 

aSlotTime are the basis of all other durations. In 802.11a, aSlot-

 

Time is 9µs . As the name indicates, and as can be seen in

 

Figure 3.7, aSlotTime is used during the Collision Avoidance (CA).

 

The CA is explained below.

 

SIFS:

The SIFS is used to prioritize the

immediate Acknowledge-

 

ment (ACK) frame of a data frame,

the response (Clear To

 

Send (CTS) frame) to a Request To Send (RTS) frame, a subsequent

 

MPDU of a fragmented MSDU, response to any polling using

 

the PCF, and any frames of the AP during the Contention Free Pe-

 

riod (CFP). RTS and CTS are explained below. SIFS is 16 µs for

 

802.11a.

 

PIFS:

The PIFS is used by stations operating under the PCF to obtain

 

channel access with highest priority. PIFS is calculated as:

 

PIFS=SIFS+aSlotTime . PIFS is 25 µs for 802.11a.

DIFS:

The DIFS is used by stations operating under the DCF to ob-

 

tain channel access to initiate frame exchanges. DIFS is calcu-

 

lated as: DIFS=SIFS+2 aSlotTime . DIFS is 34µs for 802.11a.

EIFS:

The EIFS is used instead of DIFS by stations operating under

 

the DCF whenever the PHY indicates that a frame transmission

 

did not result in a correct sequence as denoted in the Frame

 

Check Sequence (FCS). The EIFS is therefore used when multiple

 

stations initiated frame exchanges at

different starting times.

28

3. IEEE 802.11

This occurs typically when these stations are hidden to each other. The EIFS is an extended interframe space resulting in a longer deferral from channel access, which gives other stations clearly a higher priority in medium access. As soon as one other frame is received correctly, DIFS is used again. EIFS is around 200µs for 802.11a.

3.3.1.1Collision Avoidance

As part of the DCF, it may occur that more than one station attempt to transmit at the same time. This is called a collision. In wireless communication, a transmitter cannot detect a collision at a receiver, while transmitting. To account for this, 802.11 is based on Carrier Sense Multiple Access / Collision Avoidance (CSMA/CA).

If two or more stations detect the channel as being idle at the same time, inevitably a collision occurs when these stations initiate a frame exchange at the same time. The 802.11 defines a CA mechanism to reduce the probability of such collisions. As part of CA, a station performs the so-called backoff procedure before starting a transmission. A station that has an MSDU to deliver has to keep sensing the channel for an additional random time duration after detecting the channel as being idle for the minimum duration DIFS, which is 34 us for 802.11a. Only if the channel remains idle for this additional random time duration, the station is allowed to initiate its transmission. The duration of this random time is determined as a multiple of a slot duration (aSlotTime). Each station maintains a so-called Contention Window (CW), which is used to determine the number of slot times a station has to wait before transmission. Figure 3.7 shows an example: after a successful frame exchange, i.e., after the ACK transmission, a station starts the next frame exchange (RTS frame followed by CTS frame), because the radio channel has been idle for a duration equal to DIFS and its following backoff slots. The contention window size increases when a transmission fails, i.e., when the transmitted data frame has not been acknowledged.

 

 

 

 

 

 

DIFS

 

 

 

 

 

 

 

 

 

 

 

 

 

 

with 802.11a:

 

 

 

 

 

 

 

 

 

 

 

 

PIFS

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

slot:9us

SIFS: 16us

 

DATA

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

PIFS:25us

DIFS: 34us

 

 

 

 

SIFS

 

 

 

 

SIFS

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

SIFS

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

ACK

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

RTS

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

SIFS

 

CTS

 

 

 

busy

 

 

 

 

 

 

 

 

 

 

 

 

 

 

Contention Window

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

(counted in slots,

 

 

 

 

 

 

 

 

channel

 

 

 

 

 

 

 

 

 

 

 

9us per slot, 15 slots in 802.11a)

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

time

 

 

 

 

 

defer access

count down as long as medium

is idle,

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

backoff when medium gets busy

 

 

 

 

 

 

Figure 3.7: Interframe spaces and backoff procedure with random contention window size.