IEEE 802.11i [21], an IEEE standard ratified June 24, 2004, is designed to provide enhanced security in the Medium Access Control (MAC) layer for 802.11 networks. The 802.11i specification defines two classes of security algorithms: Robust Security Network Association (RSNA), and Pre-RSNA. Pre-RSNA security consists of Wired Equivalent Privacy (WEP) and 802.11 entityauthentication. RSNA provides two data confidentiality protocols, called the Temporal Key Integrity Protocol (TKIP) and the Counter-mode/CBC-MAC Protocol (CCMP), and the RSNA establishment procedure, including 802.1X authentication and key management protocols. This paper analyzes security aspects of the 802.11i specification, considering data confidentiality, integrity, mutual authentication, and availability. Our analysis suggests that 802.11i is a well-designed standard for data confidentiality, integrity, and mutual authentication, promising to improve the security of wireless networks. At the same time, some vexing Denial-of-Service (DoS) attacks remain. We review the known DoS attacks and describe appropriate countermeasures. We also describe two new DoS attacks – RSN Information Element (RSN IE) Poisoning and 4-Way Handshake Blocking – and present countermeasures for these. We also analyze the failure-recovery strategy in 802.11i and discuss associated tradeoffs. Finally we outline an improved version of 802.11i that addresses all the vulnerabilities discussed in this paper.