802.11e Amendment: MAC Enhancement for QoS


802.11e Amendment: MAC Enhancement for QoS


IEEE 802.11e-2005 or 802.11e is an approved amendment to the IEEE 802.11 standard that defines a set of quality of service (QoS) enhancements for wireless LAN applications through modifications to the media access control (MAC) layer.

The amendment has been incorporated into the published IEEE 802.11-2007 standard.

Purpose


Define the MAC procedure to support LAN applications with QoS requirements, including the transport of voice, audio and video over WLAN.

This corresponds to the WMM certification of the WiFi Alliance.

MAC Access Modes and Timing


Ethernet-like CSMA/CA access is provided by the distributed coordination function (DCF).
It checks the radio link before transmitting.

The point coordination function (PCF) is built on the top of DCF to provide the contention-free service.
Special stations(AP) are used to ensure that the medium is provided without contention.
The PCF allows STAs to transmit frames after a short interval.

The hybrid coordination function (HCF) combines and enhances DCF and PCF to provide QoS access to the wireless medium.
HCF included the functionality provided by both EDCA and HCCA.

Carrier-Sensing Functions and the Network Allocation Vector(NAV)


Two types of carrier-sensing functions in 802.11 manage this process: the physical carrier-sensing and virtual carrier-sensing functions. If either carrier-sensing function indicates that the medium is busy, the MAC reports this to high layers.

Because transceivers can transmit and receive simultaneously only if they incorporate expensive electronics, physical carrier-sensing cannot provide all the necessary information.

Virtual carrier-sensing is provided by the Network Allocation Vector (NAV). Most 802.11 frames carry a duration field, which can be used to reserve the medium for a fixed time period.

  • Stations set the NAV to the time for which they expect to use the medium
  • In which time the medium will be busy
  • Other stations count down from NAV to 0. When the NAV is nonzero, the virtual-sensing function indicates that the medium is busy

The NAV may be thought of as a counter, which counts down to zero at a uniform rate. In IEEE 802.11, the NAV represents the number of microseconds the sending STA intends to hold the medium busy (maximum of 32,767 microseconds).

802.11 DCF


A minimum spacing between two non-colliding frames is required.

When a frame arrives at the head of the Tx queue,
  • if the channel is busy
  • The MAC waits until the the medium becomes idle using the following mechanism:
    1. defers for an extra time interval ( called DCF Interframe Space, DIFS )
    2. if the channel stays idle during the DIFS, then, the MAC starts the backoff process by selecting a random backoff counter(BC)
      • For each time slot interval, during which the medium stays idle, the random BC is decremented.
      • If, while counting down, another user begins transmitting, the user in backoff mode suspends its counting, until the transmitting user finishes and the medium is sensed to be idle for a DIFS duration, and resumes its countdown thereafter.
      • When the BC reaches 0, the frame is transmitted.
  • if there is no on-going backoff process and the medium has been idle longer than the DIFS interval
  • The frame is transmitted immediately.


A period called the contention window or backoff window follows the DIFS.
The window is divided into slots, the slot length is medium-dependent.
Each STA maintains a contention window (CW), which is used to select the random backoff counter.
The BC is determined as a random integer drawn from a uniform distribution over the interval [0, CW].
A new CW value is updated by 2^(CW+1) - 1, with an upper bound of CWmax (dependent on the PHY type).
The size of CW is initially assigned CWmin, and increases when a transmission fails.
After each successful transmission, the CW value is reset to CWmin.
When several STAs are attempting to transmit, the STA with the lowest random number slots wins.



  • For each successful reception of a frame, the receiving STA immediately sends the ACK frame after a short IFS (SIFS)
  • Other STAs resume the backoff process after the DIFS time.
The ACK frame is protected due to DIFS > SIFS.

Varying IFS create different priority levels for different type of frames.
  • Short IFS(SIFS)
  • The highest priority for RTS/CTS and ACK.
  • PCF IFS(PIFS)
  • This is used for contention-free transmission. PCF運作的特色是在一個具有協調者 (Point Coordinator) 的BSS中,所有工作站都能接收在PCF控制下所傳送的所有訊框。
    • 有能力回覆CF-polling的工作站稱為可輪詢(CF-Pollable) 工作站。
    • 每次被輪詢到時可以傳送一筆訊框。
    • 無能力回覆CF-polling的工作站稱為非輪詢(Non CF-Pollable) 工作站。
    • 在免競爭週期中不能傳送訊框
    在 PCF 週期中,協調者與被輪詢者在傳送訊框時都不使用 RTS/CTS 控制訊框。協調者在CF週期內重送訊框時並不像DCF所採用的後退方法 (backoff)。它等到該目的地工作站再次成為輪詢名單中的首位時才重送此訊框。也可以在CF週期內等到一個 PIFS 的空檔時重送此訊框。
  • DCF IFS(DIFS)
  • The minimum idle time for contention-based service.

Enhanced Distributed Channel Access (EDCA)


This introduces the traffic priority and create a transmit opportunity for each type of traffic.
  • There is FIFO queue for each traffic priority
  • High priority traffic waits less than low priority traffic
  • Each traffic priority has a different backoff value
  • the higher the priority, the shorter the backoff value is.
  • When a STA wins the access, it can send a frame during its Transmit Opportunity (TXOP)
  • A TXOP is a bounded time interval during which a station can send as many frames as possible (as long as the duration of the transmissions does not extend beyond the maximum duration of the TXOP). If a frame is too large to be transmitted in a single TXOP, it should be fragmented into smaller frames.
  • The TXOP is different for each priority level
  • the higher the priority, the longer the TXOP.

An 802.11e STA shall implement 4 access category (AC).
Basically, an AC uses different DIFS for each AC, called the arbitration inter frame space(AIFS):

  AIFS[AC] = SIFS + AIFS[AC].SlotTime

The backoff counter will begin countdown after the channel has been idle for the period specified by the AIFS of the AC.
And, the backoff counter is selected by:

  [ 1, 1+ CW[AC] ]
The CWmin and CWmax values are calculated from aCWmin and aCWmax values, respectively, that are defined for each physical layer supported by 802.11e.
ACCWminCWmax
Background (AC_BK)aCWminaCWmax
Best Effort (AC_BE)aCWminaCWmax
Video (AC_VI)(aCWmin+1)/2-1aCWmin
Voice (AC_VO)(aCWmin+1)/4-1(aCWmin+1)/2-1


AP will announce the following via the beacon frame:
  • AIFS[AC]
  • CWmin[AC]
  • CWmax[AC]
  • TXOPLimit[AC]
  • 802.11e defines the TXOP as the interval of time when a STA has the right to initiate transmissions. During an DCF TXOP, a STA is allowed to transmit multiple MPDU from the same AC with a SIFS.



7.3.2.16 Traffic Classification (TCLAS) Element


The Traffic Classification (TCLAS) element specifies an IE that contains a set of parameters necessary to identify incoming MSDUs with a particular traffic stream to which they belong. If required, the TCLAS element is provided in an ADDTS request and ADDTS response frames only for the downlink or bidirectional links.

The Classifier Parameters are the following parameters contained in a TCP/UDP header:
  • Classifier Type 0 ( Ethernet parameters )
  • Classifier Type 1 ( TCP/UDP IP parameters )
    • IP v4/v6 version
    • source address
    • destination address
    • source port
    • destination port
    • DSCP( for IPv4 )
    • protocol( for IPv4 )
    • flow label ( for IPv6 )
  • Classifier Type 2 ( 802.11D/Q parameters )

7.4.2 QoS action frame detail


Several Action frame formats are defined for QoS purposes.

Hybrid Controlled Channel Access (HCCA)

HCCA is not mandatory in 802.11e.

  • During the Contention Period(CP), all stations work in EDCA
  • AP can request a Contention Free Period(CFP) at any time during CP by sending a Control Contention (CC) frame. CFP is called Controlled Access Phase(CAP) in 802.11e
  • During CAP, AP is called Hybrid Controller(HC), takes control of the medium
  • Every STA sends aReservation Request frame to request the medium from the HC
  • HC gives access to the medium to a STA to send packets during a time defined by HC

802.11 Medium Contention


These are the steps a station go through prior to transmit a frame to the wireless medium
  1. STAs use a physical carrier sense (Clear Channel Assessment—CCA) to determine if the wireless medium is busy.
  2. STAs use virtual carrier sense (Network Allocation Vector—NAV) to detect if the medium is busy. When the virtual timer (NAV) reaches zero, STAs may proceed.
  3. If conditions 1 and 2 are met, STAs wait the necessary IFS interval, as prescribed by the protocol.
  4. If conditions 1 and 2 are met through the duration of condition 3, STAs generate a random backoff number in accordance with the range of allowed values.
  5. STAs begin decrementing the backoff timer by one for every slot time duration that the wireless medium is idle.
  6. After decrementing the backoff value to zero, with an idle medium, a STA may transmit the allotted frame exchange, in accordance with the parameters of the obtained transmission opportunity (TXOP).
  7. If another STA transmits before Step 6 is completed, STAs observe steps 1, 2, 3, and 5 until the backoff timer is equal to zero.
  8. After a successful transmission, repeat as needed.

Differentiated services in the IPv4 and IPv6 Headers


Differentiated services or DiffServ is a computer networking architecture that specifies a simple and scalable mechanism for classifying and managing network traffic and providing quality of service (QoS) on modern IP layer.
DiffServ uses a 6-bit differentiated services code point (DSCP) in the 8-bit differentiated services field (DS field) in the IP header for packet classification purposes. The DS field replaces the outdated IPv4 TOS field.

  • ToS field
  • 01234567
    Precedence Type of Service
    The 4 TOS bits (the 'TOS field', the last bit of Type of Service "bit-7" was defined as "Must Be Zero") are defined as:
    BinaryDecimcalMeaning
    10008Minimize delay (md)
    01004Maximize throughput (mt)
    00102Maximize reliability (mr)
    00011Minimize monetary cost (mmc)
    00000Normal Service
  • DS field
  • RFC 2474 reserved the first six bits of DS field (or IPv4 ToS) for the DiffServ Code Points (DSCP), and RFC 3168 reserved the last two bits for Explicit Congestion Notification(for TCP mechanism).
    01234567
    DSCP ECN
  • The decimal value Conversion Table between "DSCP", "TOS", and "IP Precedence"
  • DSCP
    6-bits values
    (0 - 56)
    TOS
    8-bits values
    (0 - 224)
    IP Prec
    3-bits values
    (0 - 7)
    000
    8(001000)32(001 00000)1(001)
    10(001010)40(001 01000)1(001)
    14561
    18722
    22882
    24963
    281123
    341364
    361444
    381524
    401605
    461845
    481926
    562247
Prior to DiffServ, IPv4 networks could use the 3-bits Precedence field in the TOS byte of the IPv4 header to mark priority traffic.
The IETF agreed to reuse the TOS octet as the DS field for DiffServ networks.

A group of routers that implement common, administratively defined DiffServ policies are referred to as a DiffServ domain.
Network traffic entering a DiffServ domain is subjected to classification and conditioning.
Traffic in each class may be further conditioned by subjecting the traffic to rate limiters, traffic policers or shapers.
The Per-Hop Behavior(PHB) is determined by the DS field of the IP header.
In theory, a network could have up to 64 (i.e. 2**6) different traffic classes using different DSCPs.
In practice, however, most networks use the following commonly defined Per-Hop Behaviors:
  • Default PHB
  • which is typically best-effort traffic
  • Expedited Forwarding (EF) PHB
  • dedicated to low-loss, low-latency traffic
  • Assured Forwarding (AF) PHB
  • gives assurance of delivery under prescribed conditions
  • Class Selector PHBs
  • which maintain backward compatibility with the IP Precedence field. In order to maintain backward compatibility with network devices that still use the Precedence field, DiffServ defines the Class Selector PHB. The Class Selector Code Points are of the binary form 'xxx000'. The first three bits are the IP precedence bits. Each IP precedence value can be mapped into a DiffServ class.
    DSCPBinaryHexDecimalTypical applicationExamples
    CS0 (Default)000 0000x000
    CS1001 0000x088ScavengerYouTube, Gaming, P2P
    CS2010 0000x1016OAMSNMP,SSH,Syslog
    CS3011 0000x1824SignalingSCCP,SIP,H.323
    CS4100 0000x2032RealtimeTelePresence
    CS5101 0000x2840Broadcast videoCisco IPVS
    CS6110 0000x3048Network controlEIGRP,OSPF,HSRP,IKE
    CS7111 0000x3856
    CS0 equals to IP precedence 0, CS1 to IP precedence 1, and so on. If a packet is received from a non-DiffServ aware router that used IP precedence markings, the DiffServ router can still understand the encoding as a Class Selector code point.

WiFi Multimedia Technique Specification


3.3 Assignment of Frames to Queues

3.3.1 Mappings for Unicast Frames


The priority bits of 802.1D field are mapped to Access Category (AC) according to Table 14. ( Jerry: There is no DSCP mapping defined for AC )


A.4 WMM AP Default Parameter


It s recommended that the AP uses the default EDCA parameter listed in Table 15 and advertises the Table 13 values in WMM Parameter Elements.


WMM System Interoperability Test Plan


3.4.11 Miscellaneous Testing Notes


Devices in the testbed or devices under test may use DSCP or 802.11d/VLAN tagging to indicate which of the 4 Access Categories a given packet should be assigned.
All the functionality defined by IEEE 802.1D has been incorporated into either IEEE 802.1Q or IEEE 802.1AC.

802.1Q adds a 32-bit field between the source MAC address and the EtherType fields:
  • Tag protocol identifier (TPID)
  • A 16-bit field set to a value of 0x8100 in order to identify the frame as an IEEE 802.1Q-tagged frame.
  • Tag control information (TCI)
  • A 16-bit field containing the following sub-fields:
    • Priority code point (PCP)
    • Drop eligible indicator (DEI)
    • VLAN identifier (VID)

6.2 DSCP


The recommended mapping between DSCP values and 802.11d/AC values is shown in Table A-1.

The examples to generate traffic with ToS=0x20(DSCP=0x08):

  iperf -c 192.168.0.15 -w 128.0k -p 5001 -t 5 -S 0x20
  • default is mapped to WMM BK
  • remap to WMM Vi

However it should be noted that some systems use different mappings at the network interface.
The general mapping:
TOS DSCP WMM_AC
0x20(0010 0000) (00 1000)0x08 BK
0x60(0110 0000) (01 1000)0x18 BE
0x80(1000 0000) (10 0000)0x20 VI
0xc0(1100 0000) (11 0000)0x30 VO

留言

熱門文章