The 802.11 basic medium access CONTROL LAYER behavior allows interoperability between compatible PHYs through the use of the CSMA/CA protocol and a random backoff time following a busy medium condition. In addition, all directed traffic uses immediate positive acknowledgment (ACK frame), where the sender schedules a retransmission if no ACK is received. The 802.11 CSMA/CA protocol is designed to reduce the collision probability between multiple stations accessing the medium at the point in time where collisions would most likely occur. Collisions are most likely to happen just after the medium becomes free, just after busy medium conditions. This is because multiple stations would have been waiting for the medium to become available again. Therefore, a random back-off arrangement is used to resolve medium contention conflicts. The 802.11 MAC also describes the way beacon frames are sent by the AP at regular intervals (like 100 ms) to enable stations to monitor the presence of the AP. The MAC also gives a set of management frames that allow a station to actively scan for other APs on any available channel. Based on this information the station may decide on the best suited AP. In addition, the 802.11 MAC defines special functional behavior for fragmentation of packets, medium reservation via request-to-send/clear-to-send (RTS/CTS) polling interaction, and point coordination (for time-bounded services)
The MAC sublayer is responsible for the channel allocation procedures, protocol data unit (PDU) addressing, frame formatting, error checking, and fragmentation and reassembly. The transmission medium can operate in the contention mode exclusively, requiring all stations to contend for access to the channel for each packet transmitted. The medium can also alternate between the contention mode, known as the contention period (CP), and a contention-free period (CFP). During the CFP, medium usage is controlled (or mediated) by the AP, thereby eliminating the need for stations to contend for channel access. IEEE 802.11 supports three different types of frames: management, control, and data. The management frames are used for station association and disassociation with the AP, timing and synchronization, and authentication and deauthentication. Control frames are used for handshaking during the CP, for positive acknowledgments during the CP, and to end the CFP. Data frames are used for the transmission of data during the CP and CFP, and can be combined with polling and acknowledgments during the CFP. The standard IEEE 802.11 frame format Note that the frame body (MSDU) is a variable-length field consisting of the data payload and seven octets for encryption/decryption if the optional wired equivalent privacy (WEP) protocol is implemented. The IEEE standard 48-bit MAC addresses are used to identify source and destination stations. The two octets for the duration field indicate the time (in microseconds) the channel will be allocated for successful transmission of a MAC protocol data unit (MPDU). The type bits identify the frame as either control, management, or data.The subtype bits further identify the type of frame (e.g., Clear to Send control frame). A 32-bit cyclic redundancy check (CRC) is used for error detection.