现象: 笔记本访问外网服务内容速度正常,访问局域网速度慢得像蜗牛,甚至打不开。 包括用IP访问路由器。 以前不这样,不知道是哪次更新还是更改了什么配置造成了这种现象。
请各位帮忙看下该如何解决。 如果需要远程ssh到电脑上检查也是非常欢迎的。 实在搞不定了,搜索、wiki都翻遍了找不到原因。
已做的测试:
1. 使用 wifi 连接路由,访问路由和网内其它机器速度慢,外网速度飞快.
2. 使用网线连接路由,关闭wifi。 访问路由速和网内其它机器速度慢,外网速度飞快。
3. 更换其它路由(不在同一个局域网),访问路由和网内其它机器速度慢,外网速度飞快。
4. 安装了双系统,使用windows访问路由速度快。(至少网卡没坏:))
5. 更改dns地址,无效。
6. 尝试关闭 dhcpcd , 不使用networkManager管理, 不使用dnsmasq 等等。。
系统参数如下:
+ OS: Arch Linux x86_64
# Hostname: Laptop
### Kernel Release: 4.10.13-1-ARCH
##### Uptime: 0:41
###### WM: None
; #####; DE: GNOME
+##.##### Packages: 1572
+########## Processor Type: Intel(R) Core(TM) i7-3720QM CPU @ 2.60GHz
#############; $EDITOR: vim
###############+ Root: 53G / 78G (67%) (ext4)
$ ip address
```
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: wlp3s0: <BROADCAST,MULTICAST,UP,LOWER_UP> mtu 1500 qdisc mq state UP group default qlen 1000
link/ether 60:67:20:e3:58:b0 brd ff:ff:ff:ff:ff:ff
inet 192.168.123.126/24 brd 192.168.123.255 scope global dynamic wlp3s0
valid_lft 84854sec preferred_lft 84854sec
inet6 fe80::7a3a:eb35:1dca:ae0d/64 scope link
valid_lft forever preferred_lft forever
3: enp0s25: <NO-CARRIER,BROADCAST,MULTICAST,UP> mtu 1500 qdisc fq_codel state DOWN group default qlen 1000
link/ether 00:21:cc:d2:0c:7c brd ff:ff:ff:ff:ff:ff
4: docker0: <NO-CARRIER,BROADCAST,MULTICAST,UP> mtu 1500 qdisc noqueue state DOWN group default
link/ether 02:42:4d:bf:78:ba brd ff:ff:ff:ff:ff:ff
inet 172.17.0.1/16 scope global docker0
valid_lft forever preferred_lft forever
```
╰─➤ lspci -v
```
00:00.0 Host bridge: Intel Corporation 3rd Gen Core processor DRAM Controller (rev 09)
Subsystem: Lenovo Device 21f3
Flags: bus master, fast devsel, latency 0
Capabilities: <access denied>
Kernel driver in use: ivb_uncore
00:01.0 PCI bridge: Intel Corporation Xeon E3-1200 v2/3rd Gen Core processor PCI Express Root Port (rev 09) (prog-if 00 [Normal decode])
Flags: bus master, fast devsel, latency 0, IRQ 26
Bus: primary=00, secondary=01, subordinate=01, sec-latency=0
I/O behind bridge: 00006000-00006fff [size=4K]
Memory behind bridge: f0000000-f10fffff [size=17M]
Prefetchable memory behind bridge: 00000000c0000000-00000000d1ffffff [size=288M]
Capabilities: <access denied>
Kernel driver in use: pcieport
Kernel modules: shpchp
00:02.0 VGA compatible controller: Intel Corporation 3rd Gen Core processor Graphics Controller (rev 09) (prog-if 00 [VGA controller])
Subsystem: Lenovo Device 21f4
Flags: bus master, fast devsel, latency 0, IRQ 34
Memory at f1400000 (64-bit, non-prefetchable) [size=4M]
Memory at e0000000 (64-bit, prefetchable) [size=256M]
I/O ports at 7000 [size=64]
[virtual] Expansion ROM at 000c0000 [disabled] [size=128K]
Capabilities: <access denied>
Kernel driver in use: i915
Kernel modules: i915
00:14.0 USB controller: Intel Corporation 7 Series/C210 Series Chipset Family USB xHCI Host Controller (rev 04) (prog-if 30 [XHCI])
Subsystem: Lenovo Device 21f3
Flags: bus master, medium devsel, latency 0, IRQ 27
Memory at f3920000 (64-bit, non-prefetchable) [size=64K]
Capabilities: <access denied>
Kernel driver in use: xhci_hcd
Kernel modules: xhci_pci
00:16.0 Communication controller: Intel Corporation 7 Series/C216 Chipset Family MEI Controller #1 (rev 04)
Subsystem: Lenovo Device 21f3
Flags: bus master, fast devsel, latency 0, IRQ 29
Memory at f3935000 (64-bit, non-prefetchable) [size=16]
Capabilities: <access denied>
Kernel driver in use: mei_me
Kernel modules: mei_me
00:16.3 Serial controller: Intel Corporation 7 Series/C210 Series Chipset Family KT Controller (rev 04) (prog-if 02 [16550])
Subsystem: Lenovo Device 21f3
Flags: bus master, 66MHz, fast devsel, latency 0, IRQ 19
I/O ports at 70b0 [size=8]
Memory at f393c000 (32-bit, non-prefetchable) [size=4K]
Capabilities: <access denied>
Kernel driver in use: serial
00:19.0 Ethernet controller: Intel Corporation 82579LM Gigabit Network Connection (rev 04)
Subsystem: Lenovo Device 21f3
Flags: bus master, fast devsel, latency 0, IRQ 30
Memory at f3900000 (32-bit, non-prefetchable) [size=128K]
Memory at f393b000 (32-bit, non-prefetchable) [size=4K]
I/O ports at 7080 [size=32]
Capabilities: <access denied>
Kernel driver in use: e1000e
Kernel modules: e1000e
00:1a.0 USB controller: Intel Corporation 7 Series/C216 Chipset Family USB Enhanced Host Controller #2 (rev 04) (prog-if 20 [EHCI])
Subsystem: Lenovo Device 21f3
Flags: bus master, medium devsel, latency 0, IRQ 16
Memory at f393a000 (32-bit, non-prefetchable) [size=1K]
Capabilities: <access denied>
Kernel driver in use: ehci-pci
Kernel modules: ehci_pci
00:1b.0 Audio device: Intel Corporation 7 Series/C216 Chipset Family High Definition Audio Controller (rev 04)
Subsystem: Lenovo Device 21f3
Flags: bus master, fast devsel, latency 0, IRQ 33
Memory at f3930000 (64-bit, non-prefetchable) [size=16K]
Capabilities: <access denied>
Kernel driver in use: snd_hda_intel
Kernel modules: snd_hda_intel
00:1c.0 PCI bridge: Intel Corporation 7 Series/C216 Chipset Family PCI Express Root Port 1 (rev c4) (prog-if 00 [Normal decode])
Flags: bus master, fast devsel, latency 0, IRQ 16
Bus: primary=00, secondary=02, subordinate=02, sec-latency=0
I/O behind bridge: 00005000-00005fff [size=4K]
Memory behind bridge: f3100000-f38fffff [size=8M]
Prefetchable memory behind bridge: 00000000f1800000-00000000f1ffffff [size=8M]
Capabilities: <access denied>
Kernel driver in use: pcieport
Kernel modules: shpchp
00:1c.1 PCI bridge: Intel Corporation 7 Series/C210 Series Chipset Family PCI Express Root Port 2 (rev c4) (prog-if 00 [Normal decode])
Flags: bus master, fast devsel, latency 0, IRQ 17
Bus: primary=00, secondary=03, subordinate=03, sec-latency=0
I/O behind bridge: None
Memory behind bridge: f3000000-f30fffff [size=1M]
Prefetchable memory behind bridge: None
Capabilities: <access denied>
Kernel driver in use: pcieport
Kernel modules: shpchp
00:1c.2 PCI bridge: Intel Corporation 7 Series/C210 Series Chipset Family PCI Express Root Port 3 (rev c4) (prog-if 00 [Normal decode])
Flags: bus master, fast devsel, latency 0, IRQ 18
Bus: primary=00, secondary=04, subordinate=0b, sec-latency=0
I/O behind bridge: 00004000-00004fff [size=4K]
Memory behind bridge: f2800000-f2ffffff [size=8M]
Prefetchable memory behind bridge: 00000000f2000000-00000000f27fffff [size=8M]
Capabilities: <access denied>
Kernel driver in use: pcieport
Kernel modules: shpchp
00:1d.0 USB controller: Intel Corporation 7 Series/C216 Chipset Family USB Enhanced Host Controller #1 (rev 04) (prog-if 20 [EHCI])
Subsystem: Lenovo Device 21f3
Flags: bus master, medium devsel, latency 0, IRQ 23
Memory at f3939000 (32-bit, non-prefetchable) [size=1K]
Capabilities: <access denied>
Kernel driver in use: ehci-pci
Kernel modules: ehci_pci
00:1f.0 ISA bridge: Intel Corporation QM77 Express Chipset LPC Controller (rev 04)
Subsystem: Lenovo Device 21f3
Flags: bus master, medium devsel, latency 0
Capabilities: <access denied>
Kernel driver in use: lpc_ich
Kernel modules: lpc_ich
00:1f.2 SATA controller: Intel Corporation 7 Series Chipset Family 6-port SATA Controller [AHCI mode] (rev 04) (prog-if 01 [AHCI 1.0])
Subsystem: Lenovo Device 21f3
Flags: bus master, 66MHz, medium devsel, latency 0, IRQ 28
I/O ports at 70a8 [size=8]
I/O ports at 70bc [size=4]
I/O ports at 70a0 [size=8]
I/O ports at 70b8 [size=4]
I/O ports at 7060 [size=32]
Memory at f3938000 (32-bit, non-prefetchable) [size=2K]
Capabilities: <access denied>
Kernel driver in use: ahci
Kernel modules: ahci
00:1f.3 SMBus: Intel Corporation 7 Series/C216 Chipset Family SMBus Controller (rev 04)
Subsystem: Lenovo Device 21f3
Flags: medium devsel, IRQ 18
Memory at f3934000 (64-bit, non-prefetchable) [size=256]
I/O ports at efa0 [size=32]
Kernel driver in use: i801_smbus
Kernel modules: i2c_i801
01:00.0 VGA compatible controller: NVIDIA Corporation GF108M [NVS 5400M] (rev a1) (prog-if 00 [VGA controller])
Subsystem: Lenovo Device 21f4
Flags: bus master, fast devsel, latency 0, IRQ 32
Memory at f0000000 (32-bit, non-prefetchable) [size=16M]
Memory at c0000000 (64-bit, prefetchable) [size=256M]
Memory at d0000000 (64-bit, prefetchable) [size=32M]
I/O ports at 6000 [size=128]
Expansion ROM at f1000000 [disabled] [size=512K]
Capabilities: <access denied>
Kernel driver in use: nouveau
Kernel modules: nouveau
02:00.0 System peripheral: Ricoh Co Ltd MMC/SD Host Controller (rev 07) (prog-if 01)
Subsystem: Lenovo Device 21f3
Flags: bus master, fast devsel, latency 0, IRQ 16
Memory at f3100000 (32-bit, non-prefetchable) [size=256]
Capabilities: <access denied>
Kernel driver in use: sdhci-pci
Kernel modules: sdhci_pci
03:00.0 Network controller: Intel Corporation Centrino Advanced-N 6205 [Taylor Peak] (rev 34)
Subsystem: Intel Corporation Centrino Advanced-N 6205 AGN
Flags: bus master, fast devsel, latency 0, IRQ 31
Memory at f3000000 (64-bit, non-prefetchable) [size=8K]
Capabilities: <access denied>
Kernel driver in use: iwlwifi
Kernel modules: iwlwifi
```
离线
ping 网关延迟多少?其它机器呢?
另外贴 ip r 的结果。
离线
╰─➤ ip r
default via 192.168.123.1 dev wlp3s0 proto static metric 600
172.17.0.0/16 dev docker0 proto kernel scope link src 172.17.0.1 linkdown
192.168.123.0/24 dev wlp3s0 proto kernel scope link src 192.168.123.126 metric 600
╰─➤ ping 192.168.123.1
PING 192.168.123.1 (192.168.123.1) 56(84) bytes of data.
64 bytes from 192.168.123.1: icmp_seq=1 ttl=64 time=0.687 ms
64 bytes from 192.168.123.1: icmp_seq=2 ttl=64 time=0.748 ms
64 bytes from 192.168.123.1: icmp_seq=3 ttl=64 time=1.02 ms
64 bytes from 192.168.123.1: icmp_seq=4 ttl=64 time=0.750 ms
64 bytes from 192.168.123.1: icmp_seq=5 ttl=64 time=0.797 ms
64 bytes from 192.168.123.1: icmp_seq=6 ttl=64 time=0.708 ms
64 bytes from 192.168.123.1: icmp_seq=7 ttl=64 time=0.800 ms
64 bytes from 192.168.123.1: icmp_seq=8 ttl=64 time=0.755 ms
64 bytes from 192.168.123.1: icmp_seq=9 ttl=64 time=60.3 ms
64 bytes from 192.168.123.1: icmp_seq=10 ttl=64 time=81.2 ms
64 bytes from 192.168.123.1: icmp_seq=11 ttl=64 time=2.23 ms
64 bytes from 192.168.123.1: icmp_seq=12 ttl=64 time=0.780 ms
64 bytes from 192.168.123.1: icmp_seq=13 ttl=64 time=0.845 ms
里面有几次的ping值惨不忍睹
离线
正常的啊。你是怎么访问的呢,慢到什么程度了呢?
离线
试过各种浏览器访问,页面基本打不开。 用samba 访问在命令行可以正常访问查看。 但gui下面也很少时候能连上。
离线
使用 wget 访问页面呢?
离线
可以访问
离线
奇怪得很, 电脑上哪怕是用wget 去访问都慢得很。
比如访问 http://192.168.123.1/bootstrap/css/bootstrap.min.css
网关路由上的文件
未使用代理
但是在手机上,或者windows上面去访问确秒开
离线
时间卡在
╰─➤ wget http://192.168.123.1/bootstrap/css/bootstrap.min.css
--2017-05-13 11:20:23-- http://192.168.123.1/bootstrap/css/bootstrap.min.css
正在连接 192.168.123.1:80...
这里会卡几十秒到一两分钟,然后下载时是秒下载
bootstrap.min.css.1 100%[==================================>] 80.03K --.-KB/s 用时 0.03s
离线
抓包分析吧。wireshark / tcpdump 会用不?
离线
用了看不懂: 似乎时间都在黑色的转发上了?
离线
是重传。图中可以看到,前两次连接,对方没有回应。第三次连接时对方很快就回应了。在没有回应的期间也没有其它通信,有链路不畅、完全丢包的可能。但按你说的,其它访问又正常,如果是这样的话你应该能够很明显地察觉到。
你在它卡住的时候 ping 路由器试试?
另外你能在路由器上抓包吗?
离线
卡住时可以正常的ping,没有一次丢包
离线
离线
同样的问题,楼主解决了么,看路由地址应该也是路由刷了老毛子固件吧
离线