This is for Linux users. Vista, XP, and Mac users should seek help elsewhere.
This guide
assumes you are using wpa_supplicant (not NetworkManager, WICD, or something else).
Once you have wpa_supplicant set up properly, you can use the following code to connect to the WPA2 network. This should go in your wpa_supplicant config file, which is in /etc/wpa_supplicant/wpa_supplicant.conf on Gentoo.
network={
ssid="ritwpa2"
proto=RSN
key_mgmt=WPA-EAP
pairwise=CCMP
eap=PEAP
identity="Your DCE username"
password="Your DCE password"
ca_cert="/etc/ssl/certs/Entrust.net_Secure_Server_CA.pem"
phase2="auth=MSCHAPV2"
priority=70
}
The ca_cert line may be unncecessary; wpa2 seems to work with or without it. Also, the file in this line might be located elsewhere on your computer. You should also know that priority can be changed to any value (so that certain networks have priority over others). For the record, CCMP uses the AES algorithm.
Of course, you can do this using the wpa_gui, too. Choose PEAP (for Protected EAP) as the EAP method and then choose EAP-MSCHAPV2 as the Inner auth.