Chinaunix首页 | 论坛 | 博客
  • 博客访问: 124372
  • 博文数量: 35
  • 博客积分: 1672
  • 博客等级: 上尉
  • 技术积分: 412
  • 用 户 组: 普通用户
  • 注册时间: 2010-04-19 15:16
文章分类

全部博文(35)

文章存档

2012年(5)

2011年(9)

2010年(21)

我的朋友

分类: LINUX

2012-02-04 19:00:11

1.安装 wpa_supplicant
    
  1. emerge net-wireless/wpa_supplicant USE标记是(dbus eap-sim gnutls kernel_linux readline ssl wimax wps)
2 /etc/conf.d/net 配置
  1. # This blank configuration will automatically use DHCP for any net.*
  2. # scripts in /etc/init.d. To create a more complete configuration,
  3. # please review /usr/share/doc/openrc/net.example and save your configuration
  4. # in /etc/conf.d/net (this file :]!).
  5. config_eth0="dhcp"
  6. # Prefer wpa_supplicant over wireless-tools
  7. modules="wpa_supplicant"
  8. # It's important that we tell wpa_supplicant which driver we should
  9. # be using as it's not very good at guessing yet
  10. #wpa_supplicant_wlan0="-Dmadwifi"
  11. wpa_supplicant_wlan0="-Dwext"
  12. config_wlan0="dhcp"
  13. #config_wlan0="192.168.1.108/24 brd 192.168.1.255"
  14. #iwconfig_eth0="mode managed"
3.wpa配置文件/etc/wpa_supplicant

  1. # The below line not be changed otherwise we refuse to work
  2. ctrl_interface=/var/run/wpa_supplicant
  3. # Ensure that only root can read the WPA configuration
  4. ctrl_interface_group=0
  5. update_config=0
  6. # Let wpa_supplicant take care of scanning and AP selection
  7. ap_scan=1
  8. # Simple case: WPA-PSK, PSK as an ASCII passphrase, allow all valid ciphers
  9. network={
  10. ssid="Central-Graden-702"
  11. psk="xxxxx"
  12. # The higher the priority the sooner we are matched
  13. #key_mgmt=WPA-PSK
  14. priority=1
  15. }
  16. # This is a network block that connects to a specific unsecured access point.
  17. # We give it a higher priority.
  18. network={
  19. ssid="Central-Graden-702"
  20. psk="xxxxx"
  21. key_mgmt=WPA-PSK
  22. priority=2
  23. }
  24. # 公司网络WPA-PEAP
  25. network={
  26.         ssid="XXX-XXX"
  27.         scan_ssid=1
  28.         key_mgmt=WPA-EAP
  29.         eap=LEAP
  30.         identity="域名"
  31.         password="密码"
  32.         priority=10
  33. }

4.添加net.wlan0到默认启动

  1. ln -s net.lo net.wlan0
  2. rc-update add default net.wlan0
阅读(855) | 评论(0) | 转发(0) |
给主人留下些什么吧!~~