The 802.11 MAC
One of the most important aspects of the 802.11 standard is the rules laid down for Media Access Control (MAC). Regardless of the physical layer 802.11 is implemented on (2.4-GHz ISM band, 5-GHz UNII band, and so on), the MAC rules stay the same.Distributed Coordination Function
The 802.11 standard specifies two modes in which MAC can operate: contention free and contention based. In contention-based MAC, stations basically fight for access to the media. Similar to Ethernet, when a station wants to transmit first, it checks to see if another station is using the wire. In an Ethernet network, a station waits until the media is not in use and then transmits the packet. If another station transmits at the same time, it will detect the collision and randomly back off. This makes Ethernet a carrier sense multiple access/collision detection (CSMA/CD)–based algorithm.
When 802.11 is operating in contention-based mode, it uses a similar technique. The biggest difference is that most 802.11 cards only have one radio, which means they can transmit or receive, but not both at the same time, making collision detection impossible. Instead, 802.11 needs to employ collision avoidance, making the protocol CSMA/CA - based, not CSMA/CD. This mode, known as the Distributed Coordination Function (DCF), is the mode that almost all 802.11 networks operate under. In DCF mode, the station waits until the media is clear and then transmits data. After completing the transmission, the station waits for an acknowledgment message from the recipient to indicate the data was received successfully. If the acknowledgment message is not received, the data is retransmitted and marked to let the recipient know the station is sending the data again.
DCF and Multiple RecipientsWhile the DCF mechanism to transmit and wait for an acknowledgment is effective at ensuring a single destination host has received the transmitted data successfully, the mechanism fails to accommodate traffic with multiple recipients. If a station is sending data as a broadcast packet (destination MAC address is ff:ff:ff:ff:ff:ff) or a multicast packet (data sent to a group of recipients), it doesn't know how many hosts are on the network to identify if one or more stations missed the data. Further, if all the destination hosts were to return a positive acknowledgment simultaneously for a single received packet, it would cause massive collisions and pandemonium on the network. Appropriately, the IEEE 802.11 MAC specification indicates that positive acknowledgment messages should only be sent in response to unicast data, or traffic sent to a single destination host. This leaves stations transmitting broadcast or multicast traffic without an 802.11 mechanism to detect if their traffic was sent properly, instead relying on upper-layer protocols to determine if the station needs to retransmit, which is a performance detriment.
Point Coordination Function
The other mode in which 802.11 MAC can operate is called Point Coordination Function (PCF). In this mode, the access point controls all access to the media. In some sense, this mode of operation is superficially similar to that of token ring; instead of stations passing around a token, however, the AP polls them to see if they have any data to transmit.
The biggest similarity between running an 802.11 network using the PCF and token ring is that of market share. I am unaware of any products that actually implement the PCF mode, but it persists in the standard. In the future, as 802.11 networks get more congested and collisions take up a significant amount of bandwidth, the PCF may be more widely deployed. Since there are no real-world networks using the PCF, its details are largely omitted from this chapter.
