无线上网慢

最大的社区版本,Ubuntu的发源地
回复
yangdawei.hit
帖子: 245
注册时间: 2015-01-02 15:32
系统: Debian

无线上网慢

#1

帖子 yangdawei.hit » 2015-10-17 16:17

系统:Debian tesing

无线上网非常慢,网址即便ping通也需要很长时间,iceweasel几乎没反应。请问怎么解决这个问题?

代码: 全选

sudo ifconfig -a
[sudo] password for yangdawei: 
eth0: flags=4163<UP,BROADCAST,RUNNING,MULTICAST>  mtu 1500
        inet 192.168.0.106  netmask 255.255.255.0  broadcast 192.168.0.255
        inet6 fe80::a9e:1ff:fe89:a224  prefixlen 64  scopeid 0x20<link>
        ether 08:9e:01:89:a2:24  txqueuelen 1000  (Ethernet)
        RX packets 73287  bytes 99108174 (94.5 MiB)
        RX errors 0  dropped 94  overruns 0  frame 0
        TX packets 43884  bytes 4445050 (4.2 MiB)
        TX errors 0  dropped 0 overruns 0  carrier 0  collisions 0

lo: flags=73<UP,LOOPBACK,RUNNING>  mtu 65536
        inet 127.0.0.1  netmask 255.0.0.0
        inet6 ::1  prefixlen 128  scopeid 0x10<host>
        loop  txqueuelen 0  (Local Loopback)
        RX packets 2170  bytes 398426 (389.0 KiB)
        RX errors 0  dropped 0  overruns 0  frame 0
        TX packets 2170  bytes 398426 (389.0 KiB)
        TX errors 0  dropped 0 overruns 0  carrier 0  collisions 0

wlan0: flags=4099<UP,BROADCAST,MULTICAST>  mtu 1500
        ether 2c:d0:5a:b2:10:ca  txqueuelen 1000  (Ethernet)
        RX packets 296  bytes 57741 (56.3 KiB)
        RX errors 0  dropped 2  overruns 0  frame 0
        TX packets 270  bytes 38343 (37.4 KiB)
        TX errors 0  dropped 0 overruns 0  carrier 0  collisions 0

代码: 全选

lspci | grep Network
03:00.0 Network controller: Broadcom Corporation BCM4313 802.11bgn Wireless Network Adapter (rev 01)

代码: 全选

sudo iwconfig
eth0      no wireless extensions.

wlan0     IEEE 802.11bgn  ESSID:off/any  
          Mode:Managed  Access Point: Not-Associated   Tx-Power=19 dBm   
          Retry short limit:7   RTS thr:off   Fragment thr:off
          Encryption key:off
          Power Management:off
          
lo        no wireless extensions.
poloshiao
论坛版主
帖子: 18279
注册时间: 2009-08-04 16:33

Re: 无线上网慢

#2

帖子 poloshiao » 2015-10-17 16:30

无线上网非常慢
eth0: flags=4163<UP,BROADCAST,RUNNING,MULTICAST> mtu 1500
inet 192.168.0.106 netmask 255.255.255.0 broadcast 192.168.0.255
inet6 fe80::a9e:1ff:fe89:a224 prefixlen 64 scopeid 0x20<link>
ether 08:9e:01:89:a2:24 txqueuelen 1000 (Ethernet)
1. 有線網卡 已連線 !
wlan0: flags=4099<UP,BROADCAST,MULTICAST> mtu 1500
ether 2c:d0:5a:b2:10:ca txqueuelen 1000 (Ethernet)
2. 無線網卡 未連線 ?
lspci | grep Network
03:00.0 Network controller: Broadcom Corporation BCM4313 802.11bgn Wireless Network Adapter (rev 01)
3. 有線網卡 ?

4. 把下面指令 複製 貼進終端機 執行
4-0. uname -r
4-1. sudo lspci -knn
4-1-1. 如果無線網卡是 usb 裝置 請增加
sudo lsusb
4-2. sudo lshw -numeric -class network
4-3. sudo ifconfig -a
4-4. sudo route -nv
4-5. sudo rfkill list all
4-6. sudo nmcli dev status wlan0
4-7. sudo dhclient -v
4-8. sudo dkms status
4-9. sudo cat /etc/network/interfaces
把結果直接 選取/複製 貼上來
头像
vickycq
帖子: 4507
注册时间: 2011-03-20 13:12
系统: Debian
来自: 山东省寿光县
联系:

Re: 无线上网慢

#3

帖子 vickycq » 2015-10-17 17:52

yangdawei.hit 写了: 03:00.0 Network controller: Broadcom Corporation BCM4313 802.11bgn Wireless Network Adapter (rev 01)
没额外安装驱动的话,估计现有驱动为 brcm80211(brcmsmac),支持不佳:
参考 https://wireless.wiki.kernel.org/en/use ... /brcm80211
wireless.wiki.kernel.org 写了:Please note: at least BCM4313 is not fully supported. Some models appears to work (users reported success), but some don't, and there's no indication that this is going to change. For example: http://marc.info/?t=138817851800006&r=1&w=2
而另一个开源驱动 b43 根本不支持此卡

安装 broadcom-sta-dkms 这个包,换用私有驱动 'wl' 试试。
Debian 中文论坛 - forums.debiancn.org
欢迎所有 Debian GNU/Linux 用户
yangdawei.hit
帖子: 245
注册时间: 2015-01-02 15:32
系统: Debian

Re: 无线上网慢

#4

帖子 yangdawei.hit » 2015-10-17 22:33

因为无线网卡上不了网,在接线时将网卡信息帖了上去。下面是切换到无线网卡后得到的信息:
uname -r

代码: 全选

4.2.0-1-amd64
sudo lspci -knn | grep Network

代码: 全选

03:00.0 Network controller [0280]: Broadcom Corporation BCM4313 802.11bgn Wireless Network Adapter [14e4:4727] (rev 01)
sudo lshw -numeric -class network

代码: 全选

*-network               
       description: Network controller
       product: BCM4313 802.11bgn Wireless Network Adapter [14E4:4727]
       vendor: Broadcom Corporation [14E4]
       physical id: 0
       bus info: pci@0000:03:00.0
       version: 01
       width: 64 bits
       clock: 33MHz
       capabilities: pm msi pciexpress bus_master cap_list
       configuration: driver=bcma-pci-bridge latency=0
       resources: irq:17 memory:f4700000-f4703fff
  *-network
       description: Ethernet interface
       product: RTL8111/8168/8411 PCI Express Gigabit Ethernet Controller [10EC:8168]
       vendor: Realtek Semiconductor Co., Ltd. [10EC]
       physical id: 0
       bus info: pci@0000:09:00.0
       logical name: eth0
       version: 07
       serial: 08:9e:01:89:a2:24
       size: 100Mbit/s
       capacity: 1Gbit/s
       width: 64 bits
       clock: 33MHz
       capabilities: pm msi pciexpress msix vpd bus_master cap_list ethernet physical tp mii 10bt 10bt-fd 100bt 100bt-fd 1000bt 1000bt-fd autonegotiation
       configuration: autonegotiation=on broadcast=yes driver=r8169 driverversion=2.3LK-NAPI duplex=full ip=192.168.0.106 latency=0 link=yes multicast=yes port=MII speed=100Mbit/s
       resources: irq:26 ioport:3000(size=256) memory:f3c04000-f3c04fff memory:f3c00000-f3c03fff
  *-network
       description: Wireless interface
       physical id: 1
       logical name: wlan0
       serial: 2c:d0:5a:b2:10:ca
       capabilities: ethernet physical wireless
       configuration: broadcast=yes driver=brcmsmac driverversion=4.2.0-1-amd64 firmware=610.812 link=no multicast=yes wireless=IEEE 802.11bgn
sudo ifconfig -a

代码: 全选

eth0: flags=4163<UP,BROADCAST,RUNNING,MULTICAST>  mtu 1500
        ether 08:9e:01:89:a2:24  txqueuelen 1000  (Ethernet)
        RX packets 742311  bytes 655069490 (624.7 MiB)
        RX errors 0  dropped 402  overruns 0  frame 0
        TX packets 548388  bytes 295621239 (281.9 MiB)
        TX errors 0  dropped 0 overruns 0  carrier 0  collisions 0

lo: flags=73<UP,LOOPBACK,RUNNING>  mtu 65536
        inet 127.0.0.1  netmask 255.0.0.0
        inet6 ::1  prefixlen 128  scopeid 0x10<host>
        loop  txqueuelen 0  (Local Loopback)
        RX packets 50549  bytes 10249094 (9.7 MiB)
        RX errors 0  dropped 0  overruns 0  frame 0
        TX packets 50549  bytes 10249094 (9.7 MiB)
        TX errors 0  dropped 0 overruns 0  carrier 0  collisions 0

wlan0: flags=4163<UP,BROADCAST,RUNNING,MULTICAST>  mtu 1500
        inet 192.168.0.111  netmask 255.255.255.0  broadcast 192.168.0.255
        inet6 fe80::2ed0:5aff:feb2:10ca  prefixlen 64  scopeid 0x20<link>
        ether 2c:d0:5a:b2:10:ca  txqueuelen 1000  (Ethernet)
        RX packets 1183  bytes 183296 (179.0 KiB)
        RX errors 0  dropped 7  overruns 0  frame 0
        TX packets 717  bytes 109970 (107.3 KiB)
        TX errors 0  dropped 0 overruns 0  carrier 0  collisions 0
sudo route -nv

代码: 全选

Kernel IP routing table
Destination     Gateway         Genmask         Flags Metric Ref    Use Iface
0.0.0.0         192.168.0.1     0.0.0.0         UG    600    0        0 wlan0
169.254.0.0     0.0.0.0         255.255.0.0     U     1000   0        0 wlan0
192.168.0.0     0.0.0.0         255.255.255.0   U     600    0        0 wlan0
sudo rfkill list all

代码: 全选

0: tpacpi_bluetooth_sw: Bluetooth
	Soft blocked: no
	Hard blocked: no
1: hci0: Bluetooth
	Soft blocked: no
	Hard blocked: no
2: phy0: Wireless LAN
	Soft blocked: no
	Hard blocked: no
sudo nmcli dev status wlan0

代码: 全选

Unknown parameter: wlan0
DEVICE  TYPE      STATE         CONNECTION      
wlan0   wifi      connected     TP-LINK_HyFi_83 
eth0    ethernet  disconnected  --              
lo      loopback  unmanaged     -- 
sudo dhclient -v

代码: 全选

Internet Systems Consortium DHCP Client 4.3.3
Copyright 2004-2015 Internet Systems Consortium.
All rights reserved.
For info, please visit https://www.isc.org/software/dhcp/

Listening on LPF/wlan0/2c:d0:5a:b2:10:ca
Sending on   LPF/wlan0/2c:d0:5a:b2:10:ca
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 7
DHCPREQUEST of 192.168.0.111 on wlan0 to 255.255.255.255 port 67
DHCPOFFER of 192.168.0.111 from 192.168.0.1
DHCPACK of 192.168.0.111 from 192.168.0.1
RTNETLINK answers: File exists
bound to 192.168.0.111 -- renewal in 3142 seconds.
sudo dkms status

代码: 全选

broadcom-sta, 6.30.223.271, 4.2.0-1-amd64, x86_64: installed
sudo cat /etc/network/interfaces

代码: 全选

# This file describes the network interfaces available on your system
# and how to activate them. For more information, see interfaces(5).

source /etc/network/interfaces.d/*

# The loopback network interface
auto lo
iface lo inet loopback
上次由 yangdawei.hit 在 2015-10-17 22:45,总共编辑 1 次。
yangdawei.hit
帖子: 245
注册时间: 2015-01-02 15:32
系统: Debian

Re: 无线上网慢

#5

帖子 yangdawei.hit » 2015-10-17 22:40

安装 broadcom-sta-dkms 这个包,换用私有驱动 'wl' 试试。
请问如何换用私用驱动'wl'?
头像
vickycq
帖子: 4507
注册时间: 2011-03-20 13:12
系统: Debian
来自: 山东省寿光县
联系:

Re: 无线上网慢

#6

帖子 vickycq » 2015-10-17 22:41

driver=brcmsmac
brcmsmac支持不佳,b43不支持,见3楼
请问如何换用私用驱动'wl'?

代码: 全选

sudo apt install broadcom-sta-dkms
会自动搞定一切
sudo dkms status
broadcom-sta, 6.30.223.271, 4.2.0-1-amd64, x86_64: installed
以前装过 broadcom-sta-dkms? 还是刚装的?
上次由 vickycq 在 2015-10-17 22:54,总共编辑 2 次。
Debian 中文论坛 - forums.debiancn.org
欢迎所有 Debian GNU/Linux 用户
头像
vickycq
帖子: 4507
注册时间: 2011-03-20 13:12
系统: Debian
来自: 山东省寿光县
联系:

Re: 无线上网慢

#7

帖子 vickycq » 2015-10-17 22:51

无线上网非常慢,网址即便ping通也需要很长时间
ping 114.114.114.114 试试?也许是DNS问题。
sudo dkms status
broadcom-sta, 6.30.223.271, 4.2.0-1-amd64, x86_64: installed
以前装过 broadcom-sta-dkms? 还是刚装的?
Debian 中文论坛 - forums.debiancn.org
欢迎所有 Debian GNU/Linux 用户
yangdawei.hit
帖子: 245
注册时间: 2015-01-02 15:32
系统: Debian

Re: 无线上网慢

#8

帖子 yangdawei.hit » 2015-10-17 23:19

以前装过 broadcom-sta-dkms? 还是刚装的?
刚安装的。

ping 114.114.114.114 试试?也许是DNS问题。

代码: 全选

 ping 114.114.114.114
PING 114.114.114.114 (114.114.114.114) 56(84) bytes of data.
64 bytes from 114.114.114.114: icmp_seq=5 ttl=89 time=57.6 ms
64 bytes from 114.114.114.114: icmp_seq=12 ttl=79 time=120 ms
64 bytes from 114.114.114.114: icmp_seq=13 ttl=69 time=72.7 ms
64 bytes from 114.114.114.114: icmp_seq=14 ttl=77 time=64.6 ms
64 bytes from 114.114.114.114: icmp_seq=15 ttl=89 time=60.8 ms
64 bytes from 114.114.114.114: icmp_seq=16 ttl=86 time=59.5 ms
64 bytes from 114.114.114.114: icmp_seq=17 ttl=79 time=59.8 ms
如何解决dns的问题呢?
yangdawei.hit
帖子: 245
注册时间: 2015-01-02 15:32
系统: Debian

Re: 无线上网慢

#9

帖子 yangdawei.hit » 2015-10-17 23:34

就该是DNS的问题吧,请看在无线下的状态:

代码: 全选

 ping cn.bing.com
PING cn.a-0001.a-msedge.net (202.89.233.101) 56(84) bytes of data.
64 bytes from 202.89.233.101: icmp_seq=1 ttl=119 time=2055 ms
64 bytes from 202.89.233.101: icmp_seq=2 ttl=119 time=1058 ms
64 bytes from 202.89.233.101: icmp_seq=3 ttl=119 time=130 ms
64 bytes from 202.89.233.101: icmp_seq=4 ttl=119 time=15166 ms
yangdawei.hit
帖子: 245
注册时间: 2015-01-02 15:32
系统: Debian

Re: 无线上网慢

#10

帖子 yangdawei.hit » 2015-10-17 23:35

就该是DNS的问题吧,请看在无线下的状态:

代码: 全选

 ping cn.bing.com
PING cn.a-0001.a-msedge.net (202.89.233.101) 56(84) bytes of data.
64 bytes from 202.89.233.101: icmp_seq=1 ttl=119 time=2055 ms
64 bytes from 202.89.233.101: icmp_seq=2 ttl=119 time=1058 ms
64 bytes from 202.89.233.101: icmp_seq=3 ttl=119 time=130 ms
64 bytes from 202.89.233.101: icmp_seq=4 ttl=119 time=15166 ms
yangdawei.hit
帖子: 245
注册时间: 2015-01-02 15:32
系统: Debian

Re: 无线上网慢

#11

帖子 yangdawei.hit » 2015-10-17 23:36

就该是DNS的问题吧,请看在无线下的状态:

代码: 全选

 ping cn.bing.com
PING cn.a-0001.a-msedge.net (202.89.233.101) 56(84) bytes of data.
64 bytes from 202.89.233.101: icmp_seq=1 ttl=119 time=2055 ms
64 bytes from 202.89.233.101: icmp_seq=2 ttl=119 time=1058 ms
64 bytes from 202.89.233.101: icmp_seq=3 ttl=119 time=130 ms
64 bytes from 202.89.233.101: icmp_seq=4 ttl=119 time=15166 ms
头像
vickycq
帖子: 4507
注册时间: 2011-03-20 13:12
系统: Debian
来自: 山东省寿光县
联系:

Re: 无线上网慢

#12

帖子 vickycq » 2015-10-18 0:07

现在是 wl 驱动了么,lshw -C network 看一下

不像是DNS问题了,ping 114 60多毫秒,ping 你的网关试试。ping 192.168.0.1
Debian 中文论坛 - forums.debiancn.org
欢迎所有 Debian GNU/Linux 用户
poloshiao
论坛版主
帖子: 18279
注册时间: 2009-08-04 16:33

Re: 无线上网慢

#13

帖子 poloshiao » 2015-10-18 7:42

sudo route -nv
代碼:
Kernel IP routing table
Destination Gateway Genmask Flags Metric Ref Use Iface
0.0.0.0 192.168.0.1 0.0.0.0 UG 600 0 0 wlan0
169.254.0.0 0.0.0.0 255.255.0.0 U 1000 0 0 wlan0
192.168.0.0 0.0.0.0 255.255.255.0 U 600 0 0 wlan0
1. 有兩個 route
2. 把這個
169.254.0.0 0.0.0.0 255.255.0.0 U 1000 0 0 wlan0
移除 見 3.
2-1. 但是 重開機 可能還在 可能原因 你的 網卡設定有問題

3. 移除 169.254.0.0 route 方法
3-1. 從 終端機
sudo route del -net 169.254.0.0 netmask 255.255.0.0 wlan0
3-1-1. 再一次 檢查
route -n
看看 169.254.0.0 路由 是否不見了
3-1-2. 看看 无线上网 有沒有快一點

3-2. 如果 你希望一開機就自動執行 把 169.254.0.0 路由 刪除
gksudo gedit /etc/rc.local

sudo route del -net 169.254.0.0 netmask 255.255.0.0 wlan0
放在
exit 0
前面即可
3-2-1. 如果是 systemd 上述方法 也許需要修正 請再貼文
yangdawei.hit
帖子: 245
注册时间: 2015-01-02 15:32
系统: Debian

Re: 无线上网慢

#14

帖子 yangdawei.hit » 2015-10-18 8:11

感谢poloshiao和vickycq的帮助,按照poloshiao的建议,问题得以解决。

代码: 全选

sudo route del -net 169.254.0.0 netmask 255.255.0.0 wlan0
回复