Lo strato collegamento Wi-Fi (802.11 o WiFi) A camada ligação Wi-Fi (802.11 ou WiFi) Die Wi-Fi Sicherungsschicht (802.11 oder WiFI) La couche liaison Wi-Fi (802.11 ou WiFi) La capa de enlace Wi-Fi

Data link layer

The data link layer of the 802.11 standard is composed of two sublayers: the Logical Link Control layer (or LLC for short), and the Media Access Control layer (or MAC).

The MAC layer defines two different access methods:

  • The CSMA/CA method, which uses the Distributed Coordination Function (DCF)
  • The Point Coordination Function (PCF)

The CSMA/CA access method

In an ordinary local Ethernet network, machines use the access method CSMA/CD (Carrier Sense Multiple Access with Collision Detection), in which every machine is free to communicate at any given time. Each machine, when sending out a message, checks to make sure that no other machine is sending out a message at the same time. If one of them is, then both machines must wait for a random period of time before starting to send the message again.

In a wireless environment, this process is impossible, as two stations communicating with a receiver cannot hear one another at the same time, due to differences in their transmission ranges For this reason, the 802.11 standard uses a similar protocol called CSMA/CA (Carrier Sense Multiple Access with Collision Avoidance).

The CSMA/CA protocol uses a collision-avoidance mechanism based on reciprocal confirmation-of-receipt messages traded by the transmitter and receiver:

RTS / CTS / Data / ACK
The station that wants to transmit listens to the network. If the network is busy, the transmission is held off until later. On the other hand, if the medium remains free for a certain period of time (called DIFS for Distributed Interframe Space), then the station can transmit the signal. The station transmits a "Ready To Send " message (called "RTS" for short) containing information on the amount of data that it wishes to send, and its transmission speed. The receiver (generally an access point) responds with a "Clear To Send" message (CTS), and then the station starts sending data.

When all the data sent by the station has been received, the receiver sends an acknowledgement notice (ACK). All nearby stations then wait for as long as deemed necessary to trasmit that amount of information at the declared speed.

Checksum

The MAC layer of the 802.11 protocol has a error detection mechanism that lets it verify the integrity of the data sent. This marks a fundamental difference from the Ethernet standard. Ethernet has no error-detecting or error-correcting system, as this duty is left to higher-level transport protocols. (TCP).

In a wireless network, the error rate is higher, and this is why error detection has been included in the data link level. The error detection mechanism is based on the following 32-bit polynomial:

x32+x26+x23+x22+x16+x12+x10+x8+x7+x5+x4+x2+x+1

Fragmentation and reassembly

On the other hand, the transmission error rate on wireless network generally increases with large-size packets, and for this reason the 802.11 standard has a fragmentation mechanism, which lets a frame be broken down into many pieces, called "fragments".

Frame format

The 802.11 standard defines the format for data frames sent using the protocol. Each data frame is composed of a 30-byte-long header (called the MAC header), a body, and an FCS (Frame Sequence Check) which allows errors to be corrected.

FC
(2)
D/ID
(2)
Address 1
(4 bytes)
Address 2
(4 bytes)
Address 3
(4 bytes)
SC
(2)
Address 4
(4 bytes)
Frame body
(0 to 2312 bytes)
FCS
(2)

A description of these fields:

  • FC (Frame Control): This two-byte field is made up of the following information:

    Protocol version
    28 bits
    Type
    28 bits
    Subtype
    4 bits
    To DS
    (1 bit)
    From DS
    (1 bit)
    More Frag
    (1 bit)
    Retry
    (1 bit)
    Power Mgt.
    (1 bit)
    More Data
    (1 bit)
    WEP
    (1 bit)
    Order
    (1 bit)

    • Protocol version: This two-bit field keeps track of changes between different versions of the 802.11 standard For the first version, the value is set to 0.
    • Type and Subtype: These fields (two and four bits, respectively) define the type and subtype of the frames as explained in the table below. The type management corresponds to association requests as well as announcements sent from the access point. The type control is used for accessing the medium in order to request send authorisations. Finally, the type data relates to sending data (which is most traffic on the network).
    • To DS: This bit is set to 1 when the frame is being sent to a distribution system (DS), otherwise it is set to 0. Any frame being sent by a station to an access point has its To DS field set to 1.
    • From DS: This bit is set to 1 when the frame is coming from a distribution system (DS), otherwise it is set to 0. Therefore, when the To and From fields are set to 0, the communication is traveling directly between two stations (ad hoc mode).
    • More Fragments: Indicates, when set to 1, that there are still fragments left to be transmitted.
    • Retry: This bit specifies that the current fragment is a retransmission of a previously sent (and presumably lost) fragment.
    • Power Management: Indicates, when set to 1, that the station which sent this fragment is entering power management mode.
    • More Data): This bit, used in power management mode, is used by the access point to specifty to a station that additional frames are being stored in a wait state.
    • WEP: This bit indicates that the WEP encryption algorithm has been used to encrypt the body of the frame.
    • Order: Indicates that the frame has been sent using Strictly-Ordered Service Class.
  • Duration / ID: This field for how long the transmission canal is going to be used.
  • Address fields: A frame can contain up to 3 addresses in addition to the 48-bit address.
  • Sequence control: This field lets the reassembly mechanism distinguish between the various fragments of a single frame. It is composed of two sub-fields which allow fragments to be reordered:
    • The fragment number
    • The sequence number
  • CRC (cyclic redundancy check): a checksum used for checking data integrity.

The table below gives the frame types and subtypes contained in the frame control field of the MAC header:

Type Description of type Subtype Description of subtype
00 Management 0000 Association request
00 Management 0001 Association response
00 Management 0010 Reassociation request
00 Management 0011 Reassociation response
00 Management 0100 Probe request
00 Management 0101 Probe response
00 Management 0110-0111 Reserved
00 Management 1000 Beacon
00 Management 1001 Annoucement traffic indication message (ATIM)
00 Management 1010 Disassociation
00 Management 1011 Authentication
00 Management 1100 Deauthentication
00 Management 1101-1111 Reserved
01 Control 0000-1001 Reserved
01 Control 1010 Power Save (PS)-Poll
01 Control 1011 Request To Send (RTS)
01 Control 1100 Clear To Send (CTS)
01 Control 1101 ACK
01 Control 1110 Contention Free (CF)-end
01 Control 1111 CF-end + CF-ACK
10 Data 0000 Data
10 Data 0001 Data + CF-ACK
10 Data 0010 Data + CF-Poll
10 Data 0011 Data + CF-ACK+CF-Poll
10 Data 0100 Null function
10 Data 0101 CF-ACK
10 Data 0110 CF-Poll
10 Data 0111 CF-ACK + CF-Poll
10 Data 1000-1111 Reserved
11 Data 0000-1111 Reserved

Point Coordination Function (PCF)

The Point Coordination Function (PCF) is called a controlled access mode. It is based on checking the role of the stations one by one (a process called polling), which is controlled by the access point. A station can only send data if it is authorised to do so, and can only receive data if it is selected. This method is designed for real-time applications like voice and video, where data transmission delays must be managed.

Last update on Thursday October 16, 2008 02:43:15 PM.This document entitled « The Wi-Fi link layer » from Kioskea (en.kioskea.net) is made available under the Creative Commons license. You can copy, modify copies of this page, under the conditions stipulated by the licence, as this note appears clearly.

Best answers for « The Wi Fi link layer » in :
Introduction to Wi-Fi (802.11 or WiFi) Show Introduction to Wi-Fi (802.11) The IEEE 802.11 specification (ISO/IEC 8802-11) is an international standard describing the characteristics of a wireless local area network (WLAN). The name Wi-Fi (short for "Wireless Fidelity", sometimes incorrectly...
Choosing the best Wi-Fi channel Show Choosing the best Wi-Fi channel Wi-Fi channel Wi-Fi is a wireless network technology with a limited part of the bandwith to limit the noise of other equipment. Here is the list of channels (frequencies associated) of the ISM...
What is Wi-Fi and how it works ShowWhat is Wi-Fi and how it works How does Wi-Fi work? Frequencies What is a Hotspot? How to make a Wi-Fi connection Wireless technology has widely spread lately and you can get connected almost anywhere; at home, at work, in...
The use of Wi-Fi in companies ShowThe use of Wi-Fi in companies The benefits of Wi-Fi Designing a Wi-Fi Environment The risks of using Wi-Fi How to Secure Wi-Fi Taking advices from professionals Wi-Fi stands for Wireless Fidelity, a wireless connection that...
[Myth] Can your microwave oven affect your Wi-Fi connection? ShowCan your microwave oven affect your Wi-Fi connection? Myth Truth Myth Your microwave oven can reduced affect your Wi-Fi connection. Truth Don't be surprised if your Wi-Fi connection goes down when an nearby Microwave oven is turned...
Download WIFI Key Generator ShowWifi Connections are certainly very practical, but given that they require no wiring, everybody can be connected to it if his computer is compatible with Wifi. WIFI Key Generator is a small application intended to generate random protection keys for...
Wi-Fi wireless network security (802.11 or WiFi) ShowAdapted infrastructure The first thing to do when a wireless network is installed is to place the access points in reasonable locations depending on the desired area of coverage. However, it is not uncommon to find that the covered area ends up...
WiFi modes of operation (802.11 or Wi-Fi) ShowThere are several kinds of hardware that may be used to implement a WiFi wireless network: Wireless adapters or network interface controllers (NICs for short) are network cards with the 802.11 standard which let a machine connect to a wireless...
Risks related to wireless WiFi networks (802.11 or Wi-Fi) ShowLack of security Radio waves intrinsically have the power to propagate in all directions, with a relatively wide range. Because of this, it is very difficult to keep radio broadcasts confined to a limited area. Radio propagation also occurs three...