Linux wireless network settings (use of wpa_supplicant)

Source: Internet
Author: User
Tags wpa supplicant

Host environment: Gentoo Linux 3.1.10
The WPA Supplicant toolkit allows you to connect to those APs that use WPA. Because it is only a beta version, its configuration method will often change-even so, it can work well in most cases.
After wap_supplicant is installed, you can configure the Wireless Access Point Network by modifying/etc/wpa_supplicant/wpa_supplicant.conf.
The following is an instance of the configuration file.
 
# Do not modify the following line, otherwise it will not work properly
Ctrl_interface =/var/run/wpa_supplicant
 
# Ensure that only the root user can read the WPA Configuration
Ctrl_interface_group = 0
 
# Use wpa_supplicant to scan and select an AP
Ap_scan = 1
 
# Simple scenario: WPA-PSk password verification method. PSK is an ASCII password phrase. All valid encryption methods allow connection.
Network = {
Ssid = "simple"
Psk = "very secret passphrase"
# The higher the priority, the earlier the match can be made.
Priority = 5
}
 
# It is the same as the previous setting, but requires scanning of the specific SSID (for those APs that refuse to broadcast the SSID)
Network = {
Ssid = "second ssid"
Scan_ssid = 1
Psk = "very secret passphrase"
Priority = 2
}
 
# Only use the WPA-PSK method. Allow a combination of any valid encryption methods
Network = {
Ssid = "example"
Proto = WPA
Key_mgmt = WPA-PSK
Pairwise = CCMP TKIP
Group = ccmp tkip WEP104 WEP40
Psk = 06b4be19da289f475aa46a33cb793029d4ab3db7a23ee92382eb0417c72ac7bb
Priority = 2
}
 
# Plaintext connection mode (WPA and IEEE802.1X are not used)
Network = {
Ssid = "plaintext-test"
Key_mgmt = NONE
}
 
# Sharing the WEP Key Connection method (WPA and IEEE802.1X are not used)
Network = {
Ssid = "static-wep-test"
Key_mgmt = NONE
Wep_key0 = "abcde"
Wep_key1 = 0102030405
Wep_key2 = "1234567890123"
Wep_tx_keyidx = 0
Priority = 5
}
 
# Shared WEP Key Connection method (without WPA and IEEE802.1X), use the shared key verification method
Network = {
Ssid = "static-wep-test2"
Key_mgmt = NONE
Wep_key0 = "abcde"
Wep_key1 = 0102030405
Wep_key2 = "1234567890123"
Wep_tx_keyidx = 0
Priority = 5
Auth_alg = SHARED
}
 
# Use WPA-None/tkip in the ibss/ad-hoc Network
Network = {
Ssid = "test adhoc"
Mode = 1
Proto = WPA
Key_mgmt = WPA-NONE
Pairwise = NONE
Group = TKIP
Psk = "secret passphrase"
}
 
--
Below is my configuration file
 
Ctrl_interface =/var/run/wpa_supplicant
Ap_scan = 1
 
# Home Network
Network = {
Psk = "yming0221"
Priority = 1
Ssid = 79616e277320776921356c657373
Mode = 0
Bssid = E0: 05: C5: 17: F8: 2C
Key_mgmt = WPA-PSK
}
#
Network = {
Ssid = "351471 azjlb"
Psk = "CCTV1-CCTV2-KTV-1987"
Priority = 2
}
 
Restart the wlan0 connection.
/Etc/init. d/net. wlan0 restart

By Yan Ming -- To Be a Linux Kernel Hacker

Related Article

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.