Wifi 热点一段时间后断开连接

Wifi 热点一段时间后断开连接

我正在尝试将我的 Ubuntu 系统用作 Wifi 热点,但由于某种原因,热点会自动断开连接。在寻找解决方案时,我找到了以下帮助:为什么我的以太网连接反复连接和断开?

阅读完上述文章后,我使用了以下命令sudo killall dnsmasq,结果我设法建立热点约 5-10 秒,然后断开连接,而不是立即断开连接......

这是系统日志(以备不时之需)tail -f /var/log/syslog

Apr  1 23:31:42 NetworkManager[901]: <info> Starting dnsmasq...
Apr  1 23:31:42 NetworkManager[901]: <info> (wlan0): device state change: ip-config -> activated (reason 'none') [70 100 0]
Apr  1 23:31:42 dnsmasq[4159]: started, version 2.57 cachesize 150
Apr  1 23:31:42 dnsmasq[4159]: compile time options: IPv6 GNU-getopt DBus I18N DHCP TFTP IDN
Apr  1 23:31:42 dnsmasq-dhcp[4159]: DHCP, IP range 10.42.43.10 -- 10.42.43.100, lease time 1h
Apr  1 23:31:42 dnsmasq[4159]: reading /etc/resolv.conf
Apr  1 23:31:42 dnsmasq[4159]: using nameserver 220.226.6.104#53
Apr  1 23:31:42 dnsmasq[4159]: using nameserver 220.226.100.40#53
Apr  1 23:31:42 dnsmasq[4159]: cleared cache
Apr  1 23:31:42 NetworkManager[901]: <info> Activation (wlan0) successful, device activated.
Apr  1 23:31:42 NetworkManager[901]: <info> Activation (wlan0) Stage 5 of 5 (IP Configure Commit) complete.
Apr  1 23:31:42 NetworkManager[901]: <info> Activation (wlan0) Stage 4 of 5 (IP4 Configure Get) complete.
Apr  1 23:31:42 dbus[885]: [system] Activating service name='org.freedesktop.nm_dispatcher' (using servicehelper)
Apr  1 23:31:42 dbus[885]: [system] Successfully activated service 'org.freedesktop.nm_dispatcher'

此时连接已建立....10 秒后断开连接...

    Apr  1 23:31:52 ntpdate[4194]: adjust time server 91.189.94.4 offset -0.011589 sec
    Apr  1 23:32:01 NetworkManager[901]: <info> (wlan0): IP6 addrconf timed out or failed.
    Apr  1 23:32:01 NetworkManager[901]: <info> Activation (wlan0) Stage 4 of 5 (IP6 Configure Timeout) scheduled...
    Apr  1 23:32:01 NetworkManager[901]: <info> Activation (wlan0) Stage 4 of 5 (IP6 Configure Timeout) started...
    Apr  1 23:32:01 NetworkManager[901]: <info> Activation (wlan0) Stage 5 of 5 (IP Configure Commit) started...
    Apr  1 23:32:01 NetworkManager[901]: <info> Executing: /sbin/iptables --table filter --insert INPUT --in-interface wlan0 --protocol tcp --destination-port 53 --jump ACCEPT
    Apr  1 23:32:01 NetworkManager[901]: <info> Executing: /sbin/iptables --table filter --insert INPUT --in-interface wlan0 --protocol udp --destination-port 53 --jump ACCEPT
    Apr  1 23:32:01 NetworkManager[901]: <info> Executing: /sbin/iptables --table filter --insert INPUT --in-interface wlan0 --protocol tcp --destination-port 67 --jump ACCEPT
    Apr  1 23:32:01 NetworkManager[901]: <info> Executing: /sbin/iptables --table filter --insert INPUT --in-interface wlan0 --protocol udp --destination-port 67 --jump ACCEPT
    Apr  1 23:32:01 NetworkManager[901]: <info> Executing: /sbin/iptables --table filter --insert FORWARD --in-interface wlan0 --jump REJECT
    Apr  1 23:32:01 NetworkManager[901]: <info> Executing: /sbin/iptables --table filter --insert FORWARD --out-interface wlan0 --jump REJECT
    Apr  1 23:32:01 NetworkManager[901]: <info> Executing: /sbin/iptables --table filter --insert FORWARD --in-interface wlan0 --out-interface wlan0 --jump ACCEPT
    Apr  1 23:32:01 NetworkManager[901]: <info> Executing: /sbin/iptables --table filter --insert FORWARD --source 10.42.43.0/255.255.255.0 --in-interface wlan0 --jump ACCEPT
    Apr  1 23:32:01 NetworkManager[901]: <info> Executing: /sbin/iptables --table filter --insert FORWARD --destination 10.42.43.0/255.255.255.0 --out-interface wlan0 --match state --state ESTABLISHED,RELATED --jump ACCEPT
    Apr  1 23:32:01 NetworkManager[901]: <info> Executing: /sbin/iptables --table nat --insert POSTROUTING --source 10.42.43.0/255.255.255.0 ! --destination 10.42.43.0/255.255.255.0 --jump MASQUERADE
    Apr  1 23:32:01 NetworkManager[901]: <info> Executing: /sbin/iptables --table filter --insert INPUT --in-interface wlan0 --protocol tcp --destination-port 53 --jump ACCEPT
    Apr  1 23:32:01 NetworkManager[901]: <info> Executing: /sbin/iptables --table filter --insert INPUT --in-interface wlan0 --protocol udp --destination-port 53 --jump ACCEPT
    Apr  1 23:32:01 NetworkManager[901]: <info> Executing: /sbin/iptables --table filter --insert INPUT --in-interface wlan0 --protocol tcp --destination-port 67 --jump ACCEPT
    Apr  1 23:32:01 NetworkManager[901]: <info> Executing: /sbin/iptables --table filter --insert INPUT --in-interface wlan0 --protocol udp --destination-port 67 --jump ACCEPT
    Apr  1 23:32:01 NetworkManager[901]: <info> Executing: /sbin/iptables --table filter --insert FORWARD --in-interface wlan0 --jump REJECT
    Apr  1 23:32:01 NetworkManager[901]: <info> Executing: /sbin/iptables --table filter --insert FORWARD --out-interface wlan0 --jump REJECT
    Apr  1 23:32:01 NetworkManager[901]: <info> Executing: /sbin/iptables --table filter --insert FORWARD --in-interface wlan0 --out-interface wlan0 --jump ACCEPT
    Apr  1 23:32:01 NetworkManager[901]: <info> Executing: /sbin/iptables --table filter --insert FORWARD --source 10.42.43.0/255.255.255.0 --in-interface wlan0 --jump ACCEPT
    Apr  1 23:32:01 NetworkManager[901]: <info> Executing: /sbin/iptables --table filter --insert FORWARD --destination 10.42.43.0/255.255.255.0 --out-interface wlan0 --match state --state ESTABLISHED,RELATED --jump ACCEPT
    Apr  1 23:32:01 NetworkManager[901]: <info> Executing: /sbin/iptables --table nat --insert POSTROUTING --source 10.42.43.0/255.255.255.0 ! --destination 10.42.43.0/255.255.255.0 --jump MASQUERADE
    Apr  1 23:32:01 NetworkManager[901]: <info> Starting dnsmasq...
    Apr  1 23:32:01 NetworkManager[901]: <info> Activation (wlan0) Stage 5 of 5 (IP Configure Commit) complete.
    Apr  1 23:32:01 NetworkManager[901]: <info> Activation (wlan0) Stage 4 of 5 (IP6 Configure Timeout) complete.
    Apr  1 23:32:01 NetworkManager[901]: <warn> dnsmasq died with signal 9
    Apr  1 23:32:01 NetworkManager[901]: <info> (wlan0): device state change: activated -> failed (reason 'sharing-start-failed') [100 120 18]
    Apr  1 23:32:01 dnsmasq[4235]: started, version 2.57 cachesize 150
    Apr  1 23:32:01 dnsmasq[4235]: compile time options: IPv6 GNU-getopt DBus I18N DHCP TFTP IDN
    Apr  1 23:32:01 dnsmasq-dhcp[4235]: DHCP, IP range 10.42.43.10 -- 10.42.43.100, lease time 1h
    Apr  1 23:32:01 NetworkManager[901]: <warn> Activation (wlan0) failed for access point (Reppify Ubuntu)
    Apr  1 23:32:01 dnsmasq[4235]: reading /etc/resolv.conf
    Apr  1 23:32:01 dnsmasq[4235]: using nameserver 220.226.6.104#53
    Apr  1 23:32:01 dnsmasq[4235]: using nameserver 220.226.100.40#53
    Apr  1 23:32:01 dnsmasq[4235]: cleared cache
    Apr  1 23:32:01 NetworkManager[901]: <warn> Activation (wlan0) failed.
    Apr  1 23:32:01 NetworkManager[901]: <info> (wlan0): device state change: failed -> disconnected (reason 'none') [120 30 0]
    Apr  1 23:32:01 NetworkManager[901]: <info> (wlan0): deactivating device (reason 'none') [0]
    Apr  1 23:32:01 dbus[885]: [system] Activating service name='org.freedesktop.nm_dispatcher' (using servicehelper)
    Apr  1 23:32:01 dbus[885]: [system] Successfully activated service 'org.freedesktop.nm_dispatcher'
    Apr  1 23:32:01 NetworkManager[901]: <error> [1333303321.565351] [nm-device-wifi.c:1815] nm_device_wifi_set_mode(): (wlan0): error setting mode 2

答案1

我不是这方面的专家,但我认为错误应该出现在这里(可能出现在这里)

// at this first line message is shown of Activation is failed.
1) Apr  1 23:32:01 NetworkManager[901]: <warn> Activation (wlan0) failed.
// device state changing failed without any reason (i don't know about this, "[120 30 0]")
2) Apr  1 23:32:01 NetworkManager[901]: <info> (wlan0): device state change: failed -> disconnected (reason 'none') [120 30 0]
// deactivation.
3) Apr  1 23:32:01 NetworkManager[901]: <info> (wlan0): deactivating device (reason 'none') [0]
// if (wlan0) is not activated the what is a use of service that showing here is activating?
4) Apr  1 23:32:01 dbus[885]: [system] Activating service name='org.freedesktop.nm_dispatcher' (using servicehelper)
// no coments on this service.
5) Apr  1 23:32:01 dbus[885]: [system] Successfully activated service 'org.freedesktop.nm_dispatcher'
// refer something for error's on setting mode with no. "2". (confusing question|sorry)
6) Apr  1 23:32:01 NetworkManager[901]: <error> [1333303321.565351] [nm-device-wifi.c:1815] nm_device_wifi_set_mode(): (wlan0): error setting mode 2

如果这不是你的问题的解决方案,那么对不起兄弟,我无法为你做任何事情......

相关内容