OpenWrt:如果STA失败,AP将停止

时间:2017-07-07 01:32:50

标签: configuration switch-statement wifi ethernet openwrt

我有3个接口:

  • LAN(WiFi AP,DHCP服务器)
  • wan(WiFi STA(反),DHCP客户端)
  • wan2(以太网,DHCP客户端)

我安装了mwan3所以,使用此配置,我应该通过wan和wan2访问Internet,或者只有一个在线时才能访问其中一个。

我尝试在每个界面上模拟ifdown事件,但我仍然可以通过其他界面访问Internet。我还试图禁用WiFi STA界面,一切都很好。

但是,当我关闭与WiFi STA对应的WiFi源时,WiFi AP停止并且我已断开连接(有时无线AP重新出现几秒钟)

编辑: 这是两个系统日志 ... 当我从OpenWrt设置手动禁用Wifi客户端接口时,它很好:

:09 2017 kern.info kernel: [  606.720000] Wifi_Client: deauthenticating from dc:ee:06:d8:7e:43 by local choice (Reason: 3=DEAUTH_LEAVING)
 :09 2017 daemon.notice netifd: Network device 'Wifi_Client' link is down
 :09 2017 daemon.notice netifd: Interface 'wan' has link connectivity loss
 :09 2017 daemon.notice netifd: Network device 'wlan0-1' link is down
 :09 2017 daemon.notice netifd: Interface 'lan' has link connectivity loss
 :09 2017 daemon.notice netifd: Interface 'wan' is disabled
 :09 2017 daemon.notice netifd: Interface 'lan' is now down
 :09 2017 daemon.notice netifd: Interface 'lan' is disabled
 :09 2017 daemon.info dnsmasq[3510]: reading /tmp/resolv.conf.auto
 :09 2017 daemon.info dnsmasq[3510]: using local addresses only for domain lan
 :09 2017 daemon.info dnsmasq[3510]: using nameserver 8.8.8.8#53
 :09 2017 daemon.info dnsmasq[3510]: using nameserver 8.8.4.4#53
 :09 2017 daemon.notice netifd: wan (3154): udhcpc: SIOCGIFINDEX: No such device
 :09 2017 daemon.notice netifd: wan (3154): Received SIGTERM
 :10 2017 user.notice mwan3: ifdown interface wan (unknown)
 :11 2017 daemon.notice netifd: radio0 (12239): Configuration file: /var/run/hostapd-phy0.conf
 :11 2017 kern.info kernel: [  608.500000] IPv6: ADDRCONF(NETDEV_UP): wlan0: link is not ready
 :11 2017 daemon.notice netifd: radio0 (12239): wlan0: interface state UNINITIALIZED->COUNTRY_UPDATE
 :11 2017 daemon.notice netifd: radio0 (12239): Using interface wlan0 with hwaddr c4:6e:1f:ab:e3:a6 and ssid "Wifi_AP"
 :12 2017 daemon.notice netifd: radio0 (12239): wlan0: interface state COUNTRY_UPDATE->ENABLED
 :12 2017 daemon.notice netifd: radio0 (12239): wlan0: AP-ENABLED 
 :12 2017 kern.info kernel: [  609.850000] IPv6: ADDRCONF(NETDEV_CHANGE): wlan0: link becomes ready
 :13 2017 daemon.notice netifd: Network device 'wlan0' link is up
 :13 2017 daemon.notice netifd: Interface 'lan' is enabled
 :13 2017 daemon.notice netifd: Interface 'lan' is setting up now
 :13 2017 daemon.notice netifd: Interface 'lan' is now up
 :13 2017 daemon.notice netifd: Interface 'lan' has link connectivity 
 :14 2017 user.notice firewall: Reloading firewall due to ifup of lan (wlan0)

当我关闭Wifi客户端来源时,它变坏了:

:06 2017 kern.debug kernel: [ 1564.140000] wlan0: Limiting TX power to 20 (20 - 0) dBm as advertised by dc:ee:06:d8:7e:43
:09 2017 kern.info kernel: [ 1566.970000] wlan0: authenticate with dc:ee:06:d8:7e:43
:09 2017 kern.info kernel: [ 1567.000000] wlan0: send auth to dc:ee:06:d8:7e:43 (try 1/3)
:09 2017 daemon.notice netifd: Network device 'wlan0-1' link is down
:09 2017 daemon.notice netifd: Interface 'lan' has link connectivity loss
:09 2017 kern.info kernel: [ 1567.090000] wlan0: send auth to dc:ee:06:d8:7e:43 (try 2/3)
:09 2017 kern.info kernel: [ 1567.170000] wlan0: send auth to dc:ee:06:d8:7e:43 (try 3/3)
:10 2017 kern.info kernel: [ 1567.250000] wlan0: authentication with dc:ee:06:d8:7e:43 timed out

0 个答案:

没有答案