Wi-Fi에 자동으로 다시 연결

Wi-Fi에 자동으로 다시 연결

X11이 없는 데비안 10.

AP를 껐다가 다시 켜면 데비안은 다시 연결되는 것처럼 보이지만 데비안은 네트워크 액세스를 다시 얻지 못합니다. 즉, 아무 것도 핑할 수 없습니다(AP의 IP에는 핑을 할 수 있지만).

네트워크를 다시 작동시키려면 다음을 수행해야 했습니다.

# ifdown wlan0
# ifup wlan0

수동 개입 없이 복원할 수 있나요?

편집하다:ip a

# ip a
1: lo: <LOOPBACK,UP,LOWER_UP> mtu 65536 qdisc noqueue state UNKNOWN group default qlen 1000
    link/loopback 00:00:00:00:00:00 brd 00:00:00:00:00:00
    inet 127.0.0.1/8 scope host lo
       valid_lft forever preferred_lft forever
    inet6 ::1/128 scope host
       valid_lft forever preferred_lft forever
2: enp0s10: <BROADCAST,MULTICAST,UP,LOWER_UP> mtu 1500 qdisc pfifo_fast master br0 state UP group default qlen 1000
    link/ether d4:9a:20:f3:d8:e4 brd ff:ff:ff:ff:ff:ff
3: wlan0: <BROADCAST,MULTICAST,UP,LOWER_UP> mtu 1500 qdisc mq state UP group default qlen 1000
    link/ether 90:84:0d:f3:7a:2f brd ff:ff:ff:ff:ff:ff
    inet 192.168.43.7/24 brd 192.168.43.255 scope global dynamic wlan0
       valid_lft 2606sec preferred_lft 2606sec
    inet6 fe80::9284:dff:fef3:7a2f/64 scope link
       valid_lft forever preferred_lft forever
4: wlx00e032800384: <BROADCAST,MULTICAST,UP,LOWER_UP> mtu 1500 qdisc mq master br0 state UP group default qlen 1000
    link/ether 00:e0:32:80:03:84 brd ff:ff:ff:ff:ff:ff
7: br0: <BROADCAST,MULTICAST,UP,LOWER_UP> mtu 1500 qdisc noqueue state UP group default qlen 1000
    link/ether 00:e0:32:80:03:84 brd ff:ff:ff:ff:ff:ff
    inet 192.168.1.31/24 brd 192.168.1.255 scope global br0
       valid_lft forever preferred_lft forever
    inet6 fe80::2e0:32ff:fe80:384/64 scope link
       valid_lft forever preferred_lft forever
root@mini31:~#

/etc/network/interfaces

source /etc/network/interfaces.d/*

# The loopback network interface
auto lo
iface lo inet loopback

iface enp0s10 inet manual

iface wlx00e032800384 inet manual

# Local network: ethernet and hostapd on a second wifi adapter.
auto br0
iface br0 inet static
        bridge_ports enp0s10 wlx00e032800384
        address 192.168.1.31
        netmask 255.255.255.0

# This AP often disappears.
# The problem is to get Debian to reconnect to it
# and use it as the default route
# whenever it reappears.
auto wlan0
allow-hotplug wlan0
iface wlan0 inet dhcp
        wpa-ssid RWB
        wpa-psk password

# Future: 4g to use when wlan0 has disappeared.
#auto enp0s4f1u7
#allow-hotplug enp0s4f1u7
#iface enp0s4f1u7 inet dhcp

편집 2:ip route

root@mini31:~# # connected and working
root@mini31:~# ip route
default via 192.168.43.61 dev wlan0
192.168.1.0/24 dev br0 proto kernel scope link src 192.168.1.31
192.168.43.0/24 dev wlan0 proto kernel scope link src 192.168.43.7
root@mini31:~# # now turn off the AP to which wlan0 is connected
root@mini31:~# ip route
default via 192.168.43.61 dev wlan0 linkdown
192.168.1.0/24 dev br0 proto kernel scope link src 192.168.1.31
192.168.43.0/24 dev wlan0 proto kernel scope link src 192.168.43.7 linkdown
root@mini31:~# # now turn the AP back on. This computer soon appears in its list of connected devices.
root@mini31:~# ip route
default via 192.168.43.61 dev wlan0
192.168.1.0/24 dev br0 proto kernel scope link src 192.168.1.31
192.168.43.0/24 dev wlan0 proto kernel scope link src 192.168.43.7
root@mini31:~# ping www.google.com
^C
root@mini31:~# ping 8.8.8.8
PING 8.8.8.8 (8.8.8.8) 56(84) bytes of data.
From 192.168.43.7 icmp_seq=1 Destination Host Unreachable
^C
--- 8.8.8.8 ping statistics ---
5 packets transmitted, 0 received, +1 errors, 100% packet loss, time 85ms
pipe 4
root@mini31:~# ifdown wlan0
Killed old client process
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/90:84:0d:f3:7a:2f
Sending on   LPF/wlan0/90:84:0d:f3:7a:2f
Sending on   Socket/fallback
DHCPRELEASE of 192.168.43.7 on wlan0 to 192.168.43.87 port 67
root@mini31:~# ifup wlan0
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/90:84:0d:f3:7a:2f
Sending on   LPF/wlan0/90:84:0d:f3:7a:2f
Sending on   Socket/fallback
DHCPDISCOVER on wlan0 to 255.255.255.255 port 67 interval 7
DHCPDISCOVER on wlan0 to 255.255.255.255 port 67 interval 7
DHCPDISCOVER on wlan0 to 255.255.255.255 port 67 interval 21
DHCPOFFER of 192.168.43.7 from 192.168.43.61
DHCPREQUEST for 192.168.43.7 on wlan0 to 255.255.255.255 port 67
DHCPACK of 192.168.43.7 from 192.168.43.61
bound to 192.168.43.7 -- renewal in 1510 seconds.
root@mini31:~# ping www.google.com
PING www.google.com (216.58.211.164) 56(84) bytes of data.
64 bytes from lhr48s13-in-f4.1e100.net (216.58.211.164): icmp_seq=2 ttl=113 time=43.6 ms
^C
--- www.google.com ping statistics ---
3 packets transmitted, 1 received, 66.6667% packet loss, time 37ms
rtt min/avg/max/mdev = 43.577/43.577/43.577/0.000 ms
root@mini31:~#

답변1

이 단어를 계속 검색해 보세요.로밍관련성이 있는 것 같습니다.

그래서 다음과 같이 구성을 변경했는데 작동하는 것 같습니다.

이것은 새로운 것입니다 (부분)/etc/network/interfaces/interfaces

auto wlan0
allow-hotplug wlan0
iface wlan0 inet manual
        wpa-roam /etc/wpa_supplicant/wpa_supplicant.conf
#        wpa-ssid RWB
#        wpa-psk password

allow-hotplug RWB
iface RWB inet dhcp

이것은/etc/wpa_supplicant/wpa_supplicant.conf

network={
    ssid="RWB"
    psk="password"
    priority=1
    id_str="RWB"
    proto=RSN
    key_mgmt=WPA-PSK
    pairwise=CCMP TKIP
    group=CCMP TKIP
}

의 새로운 가상 인터페이스에 해당합니다 id_str="RWB"( 에는 표시되지 않음 ip a) interfaces.

관련 정보