Flux rss

The Wi-Fi link layer

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.
What is Wi-Fi and how it works What 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... en.kioskea.net/faq/sujet-298-what-is-wi-fi-and-how-it-works
Laptop connection in wi-fi area Hi! I am student in one of college of Pune .Our college is wi-fi area. I have Laptop but i don't know, how connect to the internet of my Laptop. en.kioskea.net/forum/affich-26575-laptop-connection-in-wi-fi-area
Can your microwave oven affect your Wi-Fi connection?Can 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 suprised if your Wi-Fi connection goes down when an nearby Microwave oven is... en.kioskea.net/faq/sujet-445-can-your-microwave-oven-affect-your-wi-fi-connection
Securing your wireless networkSecuring your wireless network What is Wi-Fi? Ad-hoc mode Infrastructure mode connection Security and protection What is Wi-Fi? Wi-Fi regroups various IEEE802.11 standards and technologies, using radio waves to provide reliable... en.kioskea.net/faq/sujet-431-securing-your-wireless-network
Gnu toolsGnu Tools for GNU/Linux The Free Software Foundation is the website where almost GNU tools for GNU/Linux is available. Below is the link for this website: http://www.fsf.org/ On the above link, you will find the list of GNU tools... en.kioskea.net/faq/sujet-852-gnu-tools
What's wrong with my Linksys WirelessGHi, I'm having some problems with my Linksys WirelessG Router. Just yesterday my internet went down and I though it was the router so I reset it. That didn't work, so I called my internet provider and they refreshed my modem for me. Since... en.kioskea.net/forum/affich-15948-what-s-wrong-with-my-linksys-wirelessg
Windows File Missing While Removing Messengerhey dudes , i was getting some problem with my Messenger so i removed it from my system.But a second after it says windows file missing and try to re-install windows on your system.But when i put the disk in the drive it doesn't repair..I... en.kioskea.net/forum/affich-18134-windows-file-missing-while-removing-messenger
Issue Loading websites with firefoxHello, I have windows XP Sp2 and i got this weird issue that some websites like (gmail, hotmail, amazon, ect) dont load with firefox, and this happened after i got the firefox 3. With explorer works fine, on safe mode works too. I tried the system... en.kioskea.net/forum/affich-11353-issue-loading-websites-with-firefox
Download SharePodSharePod is an administrator of file mp3. It integrates with the readers mp3 the most recent: Ipod and iTunes. He allows to transfer file of on the disc of Ipod.He can show under Windows files stocked in READER MP3. It inserts a research motor which... en.kioskea.net/telecharger/telecharger-816-sharepod
Download Paint.NETPaint.NET is free image and photo editing software for computers that run Windows. It features an intuitive and innovative user interface with support for layers, unlimited undo, special effects, and a wide variety of useful and powerful tools. ... en.kioskea.net/telecharger/telecharger-63-paint-net
Download CHAOS ShredderCHAOS Shredder allows to abolish permanently files or specific files, the contents of the hamper, temporary files, cookies, review or list of the recent documents. Contrary to the basic tools of abolition of Windows, files once abolished by Chaos... en.kioskea.net/telecharger/telecharger-171-chaos-shredder
Bangkok offers 15,000 free Wi-Fi spotsA Wi-Fi hotspot sign. The Thai capital will offer 500,000 people free Wi-Fi access starting Thursday, in a pilot project that will provide 15,000 hotspots for them to get online, Bangkok's municipal government said. The Thai capital will offer... en.kioskea.net/actualites/bangkok-offers-15-000-free-wi-fi-spots-10483-actualite.php3
Videogame console giants jockey for throneA woman tries the Wii Fit games console. Microsoft, Nintendo and Sony are waging battle at the Electronics Entertainment Expo, each claiming to be the true king of videogame consoles in a booming multi-billion dollar industry Microsoft, Nintendo and... en.kioskea.net/actualites/videogame-console-giants-jockey-for-throne-10546-actualite.php3
WiFi - Introduction 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 shortened to WiFi) corresponds... en.kioskea.net/wifi/wifiintro.php3
Creating a WiFi network in infrastructure mode The set-up of a Wi-Fi network in infrastructure mode is very similar to that of a computer-to-computer Wi-Fi network except for the following differences: A Wi-Fi network in infrastructure mode requires an access point, whether or not it is connected... en.kioskea.net/configuration-reseau/creer-reseau-wifi-infrastructure.php3
Processes - slserv - slserv.exe slserv.exe (slserv stands for Smart Link Service) is a process which corresponds to the control panel installed with Smart Link modem drivers. The file that corresponds to this process is normally found in the directory... en.kioskea.net/processus/slserv-exe.php3