readhat: configure wpa enabled wireless network

本文介绍如何在Linux系统中配置无线网络连接,包括扫描可用的无线网络、设置wpa_supplicant配置文件、启动服务并获取IP地址的过程。

摘要生成于 C知道 ,由 DeepSeek-R1 满血版支持, 前往体验 >

1. first of all, show me your wireless network:

   >> iwlist scan

     wlan0     Scan completed :
          Cell 01 - Address: 14:CF:92:91:F1:2E
                    ESSID:"my12345"
                    Protocol:IEEE 802.11bgn
                    Mode:Master
                    Frequency:2.437 GHz (Channel 6)
                    Encryption key:on
                    Bit Rates:150 Mb/s
                    Extra:wpa_ie=dd160050f20101000050f20401000050f20401000050f202
                    IE: WPA Version 1
                        Group Cipher : CCMP
                        Pairwise Ciphers (1) : CCMP
                        Authentication Suites (1) : PSK  
                    Extra:rsn_ie=30140100000fac040100000fac040100000fac020000
                    IE: IEEE 802.11i/WPA2 Version 1
                        Group Cipher : CCMP
                        Pairwise Ciphers (1) : CCMP
                        Authentication Suites (1) : PSK  
                    Quality=100/100  Signal level=100/100
    

2. then, configure your conf file of wpa_suppliant

     >> cat /etc/wpa_suppliant/wpa_suppliant.conf

     ctrl_interface=/var/run/wpa_supplicant
ctrl_interface_group=wheel

network={
        ssid="my12345"
        proto=WPA2
        key_mgmt=WPA-PSK
        pairwise=CCMP
        group=CCMP
        psk=c0d128a54dc2b0d29cc058204088440efd2fa168a2d96594f5736f9f3b34f6a9
 }
//NOTE: psk is created by:

// wpawpa_passphrase  my12345  my_password.

3.  check this file:

cat /etc/sysconfig/wpa_supplicant
# Use the flag "-i" before each of your interfaces, like so:
#  INTERFACES="-i eth1 -i wlan0"
INTERFACES="-i wlan0"

# Use the flag "-D" before each driver, like so:
#  DRIVERS="-D wext"
DRIVERS="-D wext"

# Other arguments
#   -u   Enable the D-Bus interface (required for use with NetworkManager)
#   -f   Log to /var/log/wpa_supplicant.log
OTHER_ARGS="-u -f /var/log/wpa_supplicant.log"

4. things are ready, use:

>>service wpa_suppliant start

5. get the ip address

>> dhclient



参考资料:

1.  

Redhat 5 下 Linux 无线网卡连接 WIFI WPA-PSK密码,

http://hi.baidu.com/velercy/item/e6b320248f0b581608750883

2.

linux下无线网路连接管理利器---wpa_supplicant的使用,

http://itxx.sinaapp.com/blog/content/107

评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值