1.安装 wpa_supplicant
- emerge net-wireless/wpa_supplicant USE标记是(dbus eap-sim gnutls kernel_linux readline ssl wimax wps)
2 /etc/conf.d/net 配置
- # This blank configuration will automatically use DHCP for any net.*
-
# scripts in /etc/init.d. To create a more complete configuration,
-
# please review /usr/share/doc/openrc/net.example and save your configuration
-
# in /etc/conf.d/net (this file :]!).
-
-
config_eth0="dhcp"
-
-
# Prefer wpa_supplicant over wireless-tools
-
modules="wpa_supplicant"
-
# It's important that we tell wpa_supplicant which driver we should
-
# be using as it's not very good at guessing yet
-
#wpa_supplicant_wlan0="-Dmadwifi"
-
wpa_supplicant_wlan0="-Dwext"
-
config_wlan0="dhcp"
-
#config_wlan0="192.168.1.108/24 brd 192.168.1.255"
-
#iwconfig_eth0="mode managed"
3.wpa配置文件/etc/wpa_supplicant
- # The below line not be changed otherwise we refuse to work
-
ctrl_interface=/var/run/wpa_supplicant
-
-
# Ensure that only root can read the WPA configuration
-
ctrl_interface_group=0
-
update_config=0
-
-
# Let wpa_supplicant take care of scanning and AP selection
-
ap_scan=1
-
-
# Simple case: WPA-PSK, PSK as an ASCII passphrase, allow all valid ciphers
-
network={
-
ssid="Central-Graden-702"
-
psk="xxxxx"
-
# The higher the priority the sooner we are matched
-
#key_mgmt=WPA-PSK
-
priority=1
-
}
-
-
# This is a network block that connects to a specific unsecured access point.
-
# We give it a higher priority.
-
network={
-
ssid="Central-Graden-702"
-
psk="xxxxx"
-
key_mgmt=WPA-PSK
-
priority=2
-
}
- # 公司网络WPA-PEAP
- network={
- ssid="XXX-XXX"
- scan_ssid=1
- key_mgmt=WPA-EAP
- eap=LEAP
- identity="域名"
- password="密码"
- priority=10
- }
4.添加net.wlan0到默认启动
- ln -s net.lo net.wlan0
-
rc-update add default net.wlan0
阅读(850) | 评论(0) | 转发(0) |