 layer 2. How- ever, as any other LAN, a WiFi network is connected to the Internet via a router, which 5 QoS for Mobile Ultra-Broadband Internet managed IP network Router ((p)) ((q)) WiFi access point WiFi access point Switch Basic service set Basic service set (BSS) (BSS) Extended service set (ESS) Figure 5.8 WiFi architectures. can be integrated within a given WiFi AP. Overall, there are two main types of WiFi architectures: Infrastructure mode. In this case each WiFi AP is connected on an Ethernet switched network, which is further connected to the Internet (or certain intranets) via a router. As illustrated in Figure 5.8, each AP and its coverage area are referred to as a basic service set (BSS), while several APs in the same WiFi local network (on the same side of the router through which they are connected to the Internet) define the extended service set (ESS). Ad-hoc mode. In this case WiFi is used for direct ad-hoc communication between wireless hosts (e.g. smartphones, laptops, and other user devices with WiFi connec- tivity). The main WiFi standard for QoS provisioning is IEEE 802.11e. To explain the WiFi QoS one needs to understand the way in which wireless stations communicate with the AP. The main access to wireless interface in almost all deployed WiFi networks is through the DCF (distributed coordination function), which is based on avoidance of collision between competing wireless stations by using CSMA/CA (carrier-sense mul- tiple access with collision avoidance) and a binary backoff algorithm (it backs off WiFi stations which may collide in accessing the wireless link, by using random backoff within a given contention window (CW)). Besides DCF, WiFi has as option to use the PCF (polling coordination function) in which AP polls wireless stations to transmit data on PCF intervals PIFS (PCF interframe space) shorter than DCF intervals DIFS (distributed coordination function interframe space). QoS support in WiFi is provided with the IEEE 802.11e standard. For the purposes of QoS support, the IEEE 8