我知道这可能是一个很常见的问题,但我经常收到“断开连接 - 您现在处于离线状态”的消息,并且我的连接会中断 30 秒到半小时左右。我真的不知道为什么会发生这种情况。任何建议都将不胜感激。我正在运行 Ubuntu 14.04。
我在其他类似的帖子中看到过这些文件。到目前为止,我还没能找到解决方案:
/etc/network/interfaces:
# interfaces(5) file used by ifup(8) and ifdown(8)
auto lo
iface lo inet loopback
/etc/resolv.conf:
# Dynamic resolv.conf(5) file for glibc resolver(3) generated by resolvconf(8)
# DO NOT EDIT THIS FILE BY HAND -- YOUR CHANGES WILL BE OVERWRITTEN
nameserver 127.0.1.1
ifconfig:
eth0 Link encap:Ethernet HWaddr f8:0f:41:eb:56:f2
UP BROADCAST MULTICAST MTU:1500 Metric:1
RX packets:0 errors:0 dropped:0 overruns:0 frame:0
TX packets:0 errors:0 dropped:0 overruns:0 carrier:0
collisions:0 txqueuelen:1000
RX bytes:0 (0.0 B) TX bytes:0 (0.0 B)
lo Link encap:Local Loopback
inet addr:127.0.0.1 Mask:255.0.0.0
inet6 addr: ::1/128 Scope:Host
UP LOOPBACK RUNNING MTU:65536 Metric:1
RX packets:1916 errors:0 dropped:0 overruns:0 frame:0
TX packets:1916 errors:0 dropped:0 overruns:0 carrier:0
collisions:0 txqueuelen:0
RX bytes:155737 (155.7 KB) TX bytes:155737 (155.7 KB)
wlan0 Link encap:Ethernet HWaddr 30:10:b3:fc:55:04
inet addr:192.168.0.5 Bcast:192.168.0.255 Mask:255.255.255.0
inet6 addr: fe80::3210:b3ff:fefc:5504/64 Scope:Link
UP BROADCAST RUNNING MULTICAST MTU:1500 Metric:1
RX packets:2388 errors:0 dropped:0 overruns:0 frame:0
TX packets:2355 errors:0 dropped:0 overruns:0 carrier:0
collisions:0 txqueuelen:1000
RX bytes:1796538 (1.7 MB) TX bytes:418490 (418.4 KB)
lspci -knn | grep Net -A2 的输出为:
01:00.0 Network controller [0280]: Qualcomm Atheros AR9462 Wireless Network Adapter [168c:0034] (rev 01)
Subsystem: Lite-On Communications Inc Device [11ad:6621]
Kernel driver in use: ath9k
答案1
不确定如何解决此类问题。另外,我很抱歉,我无法发表评论。尝试禁用 NetworkManager 并手动使用 wpa_supplicant 和 dhclient。不要使用 -B 参数运行 wpa_supplicant 以在后台运行,这样您就可以在断开连接时看到它显示的内容。它将是这样的
echo `wpa_passphrase ssid passphrase` >> /etc/wpa_supplicant.conf
wpa_supplicant -iinterface -c/etc/wpa_supplicant.conf
dhclient wlan0
现在,当您断开连接时,请查看它给出的错误。使用 dhclient 时,还要检查租用时间。