wpa_supplicant配置

我们在将 wap_supplicant start 之需要根据网络信息填写 wpa_supplicant.conf.

  • 无加密:
# Plaintext (no encryption) network

ctrl_interface=/var/run/wpa_supplicant

network={
    ssid="example open network"
    key_mgmt=NONE
}
  • WEP加密
# Static WEP keys

ctrl_interface=/var/run/wpa_supplicant

network={
    ssid="example wep network"
    key_mgmt=NONE
    wep_key0="abcde"
    wep_key1=0102030405 #第二个密钥使用十六进制表示
    wep_tx_keyidx=0 #使用第几个密钥
}
  • WEP 使用 EAP-PEAP/MSCHAPv2 验证
# IEEE 802.1X with dynamic WEP keys using EAP-PEAP/MSCHAPv2

ctrl_interface=/var/run/wpa_supplicant

network={
    ssid="example 802.1x network"
    key_mgmt=IEEE8021X
    eap=PEAP
    phase2="auth=MSCHAPV2"
    identity="user name" #用户名
    password="password" #密码
    ca_cert="/etc/cert/ca.pem"
}
  • WPA-PSK/TKIP
# WPA-PSK/TKIP

ctrl_interface=/var/run/wpa_supplicant

network={
    ssid="example wpa-psk network"
    key_mgmt=WPA-PSK
    proto=WPA
    pairwise=TKIP
    group=TKIP
    psk="secret passphrase"
}
  • WPA2-EAP/CCMP
# WPA2-EAP/CCMP using EAP-TLS

ctrl_interface=/var/run/wpa_supplicant

network={
    ssid="example wpa2-eap network"
    key_mgmt=WPA-EAP
    proto=WPA2
    pairwise=CCMP
    group=CCMP
    eap=TLS
    ca_cert="/etc/cert/ca.pem"
    private_key="/etc/cert/user.p12"
    private_key_passwd="PKCS#12 passhrase"
}

关于wpa_supplicant的详细介绍:link

猜你喜欢

转载自blog.csdn.net/u014436243/article/details/79461340