wpa 漫游配置不起作用

wpa 漫游配置不起作用

我正在尝试在漫游模式下配置 wpa_supplicant.conf。我使用带有 Sysv 的 Devuan(=没有 systemD 的 Debian)。

我的 wpa 配置工作正常:

pkill wpa;wpa -i wlan0 -c /etc/wpa_supplicant/wpa_supplicant.conf 
Successfully initialized wpa_supplicant
wlan0: CTRL-EVENT-REGDOM-CHANGE init=BEACON_HINT type=UNKNOWN
wlan0: SME: Trying to authenticate with 90:9a:4a:1c:23:55 (SSID='0j0' freq=2452 MHz)
wlan0: Trying to associate with 90:9a:4a:1c:23:55 (SSID='0j0' freq=2452 MHz)
wlan0: Associated with 90:9a:4a:1c:23:55
wlan0: CTRL-EVENT-SUBNET-STATUS-UPDATE status=0
wlan0: WPA: Key negotiation completed with 90:9a:4a:1c:23:55 [PTK=CCMP GTK=TKIP]
wlan0: CTRL-EVENT-CONNECTED - Connection to 90:9a:4a:1c:23:55 completed [id=0 id_str=]
wlan0: CTRL-EVENT-BEACON-LOSS 
wlan0: CTRL-EVENT-DISCONNECTED bssid=90:9a:4a:1c:23:55 reason=4 locally_generated=1
wlan0: CTRL-EVENT-REGDOM-CHANGE init=CORE type=WORLD
wlan0: CTRL-EVENT-REGDOM-CHANGE init=BEACON_HINT type=UNKNOWN
wlan0: SME: Trying to authenticate with 90:9a:4a:1c:23:55 (SSID='0j0' freq=2452 MHz)
wlan0: Trying to associate with 90:9a:4a:1c:23:55 (SSID='0j0' freq=2452 MHz)
wlan0: Associated with 90:9a:4a:1c:23:55
wlan0: CTRL-EVENT-SUBNET-STATUS-UPDATE status=0
wlan0: WPA: Key negotiation completed with 90:9a:4a:1c:23:55 [PTK=CCMP GTK=TKIP]
wlan0: CTRL-EVENT-CONNECTED - Connection to 90:9a:4a:1c:23:55 completed [id=0 id_str=]

/etc/init.d/networking restart 
    Running /etc/init.d/networking restart is deprecated because it may not re-enable 
some interfaces ... (warning).
Reconfiguring network interfaces...Internet Systems Consortium DHCP Client 4.4.1
Copyright 2004-2018 Internet Systems Consortium.
All rights reserved.
For info, please visit https://www.isc.org/software/dhcp/

Listening on LPF/wlan0/00:45:e2:6d:e5:a3
Sending on   LPF/wlan0/00:45:e2:6d:e5:a3
Sending on   Socket/fallback
DHCPDISCOVER on wlan0 to 255.255.255.255 port 67 interval 4
DHCPDISCOVER on wlan0 to 255.255.255.255 port 67 interval 10
DHCPOFFER of 192.168.0.34 from 192.168.0.33
DHCPREQUEST for 192.168.0.34 on wlan0 to 255.255.255.255 port 67
DHCPACK of 192.168.0.34 from 192.168.0.33
bound to 192.168.0.34 -- renewal in 3404 seconds.

我已经获得了 dhcp 租约,一切正常。现在我想要 wpa 漫游配置。我按照 /usr/share/doc/ 中的说明进行操作

vi /etc/wpa_supplicant/wpa_supplicant.conf 
network={                                                                       
    ssid="0j0"                                                                  
    psk=e1e2aae2c67d91b5f745344a82ed19deb1f8ec97052530d4a9dc748ee4492703        
     id_str="test"   
} 

ctrl_interface=/run/wpa_supplicant # set location of the control socket         
#ctrl_interface_group=<group> #group admin can use wpa_cli                      
update_config=1 #allows saving changes to file that are made in cli

 vi /etc/network/interfaces 
auto lo                                                                         
iface lo inet loopback                                                          
                                                                                
allow-hotplug wlan0                                                            
#auto wlan0                                                                      
iface wlan0 inet manual                                                        
#iface wlan0 inet dhcp                                                           
wpa-driver wext                                                          
#I tried this one too:       
#wpa-driver nl80211                                                      
wpa-roam /etc/wpa_supplicant/wpa_supplicant.conf                               
                                                                                
iface test inet dhcp    

/sbin/wpa_action test reload 

/var/log/syslog 保持沉默。什么都没发生。我肯定错过了一些东西,但不知道是什么?

大家有什么想法吗?

答案1

在选择备用热点时,我遇到了 wpa-roam 和 dhcp 配置问题。我不得不从 systemd 禁用 wpa_supplicant 的启动,并卸载 ifupdown2 包并安装 ifupdown 包。我正在运行 debian 11.6 并使用 wpa gui。

/etc/networking/interfaces

auto wlan0
iface wlan0 inet manual
    wpa-driver wext
    wpa-roam /etc/wpa_supplicant.conf

iface default inet dhcp

wpa_supplicant.conf

ctrl_interface=DIR=/var/run/wpa_supplicant GROUP=netdev
update_config=1

network={
    ssid="P500"
    psk="8db6253b9aa4"
    proto=RSN
    key_mgmt=WPA-PSK
    pairwise=CCMP
    auth_alg=OPEN
}
network={
    ssid="Nokia 3.1"
    psk="6a8f704f219c"
    proto=RSN
    key_mgmt=WPA-PSK
    pairwise=CCMP
    auth_alg=OPEN
}

相关内容