网络拓扑结构
每当我尝试在本地网络内传输文件时,scp
两个方向(服务器--->笔记本电脑或笔记本电脑--->服务器)的速度都无法达到 2Mb/s 以上。FTP 也是如此。
我注意到数据传输以 2.5[Mb/s] 开始,然后几秒钟后迅速降至 500[Kb/s]。
从服务器到笔记本电脑的传输速度稍快一些(3Mb/s 而不是 2Mb/s)。
由于这是纯本地数据传输,因此我预计速度至少为 25Mb/s。
仅供参考,一些有意义的输出:
在服务器上
:~$ ifconfig
eth0 Link encap:Ethernet HWaddr 00:13:d3:cd:8a:7b
inet adr:192.168.1.246 Bcast:192.168.1.255 Masque:255.255.255.0
adr inet6: fe80::213:d3ff:fecd:8a7b/64 Scope:Lien
UP BROADCAST RUNNING MULTICAST MTU:1492 Metric:1
Packets reçus:34893 erreurs:0 :2 overruns:0 frame:0
TX packets:45145 errors:0 dropped:0 overruns:0 carrier:0
collisions:0 lg file transmission:1000
Octets reçus:19810274 (19.8 MB) Octets transmis:57877746 (57.8 MB)
lo Link encap:Boucle locale
inet adr:127.0.0.1 Masque:255.0.0.0
adr inet6: ::1/128 Scope:Hôte
UP LOOPBACK RUNNING MTU:65536 Metric:1
Packets reçus:36 erreurs:0 :0 overruns:0 frame:0
TX packets:36 errors:0 dropped:0 overruns:0 carrier:0
collisions:0 lg file transmission:0
Octets reçus:2160 (2.1 KB) Octets transmis:2160 (2.1 KB)
:~$ sudo ethtool eth0
Settings for eth0:
Supported ports: [ TP MII ]
Supported link modes: 10baseT/Half 10baseT/Full
100baseT/Half 100baseT/Full
Supported pause frame use: No
Supports auto-negotiation: Yes
Advertised link modes: 10baseT/Half 10baseT/Full
100baseT/Half 100baseT/Full
Advertised pause frame use: No
Advertised auto-negotiation: Yes
Link partner advertised link modes: 10baseT/Half 10baseT/Full
100baseT/Half 100baseT/Full
Link partner advertised pause frame use: No
Link partner advertised auto-negotiation: Yes
Speed: 100Mb/s
Duplex: Full
Port: MII
PHYAD: 1
Transceiver: internal
Auto-negotiation: on
Supports Wake-on: pumbg
Wake-on: d
Current message level: 0x00000000 (0)
Link detected: yes
在笔记本电脑上
$ ifconfig
eth0 Link encap:Ethernet HWaddr 00:21:cc:d3:8d:67
UP BROADCAST MULTICAST MTU:1500 Metric:1
Packets reçus:0 erreurs:0 :0 overruns:0 frame:0
TX packets:0 errors:0 dropped:0 overruns:0 carrier:0
collisions:0 lg file transmission:1000
Octets reçus:0 (0.0 B) Octets transmis:0 (0.0 B)
Interruption:20 Mémoire:f2500000-f2520000
lo Link encap:Boucle locale
inet adr:127.0.0.1 Masque:255.0.0.0
adr inet6: ::1/128 Scope:Hôte
UP LOOPBACK RUNNING MTU:16436 Metric:1
Packets reçus:1562 erreurs:0 :0 overruns:0 frame:0
TX packets:1562 errors:0 dropped:0 overruns:0 carrier:0
collisions:0 lg file transmission:0
Octets reçus:478231 (478.2 KB) Octets transmis:478231 (478.2 KB)
wlan0 Link encap:Ethernet HWaddr 60:67:20:bd:5e:4c
inet adr:192.168.1.12 Bcast:192.168.1.255 Masque:255.255.255.0
adr inet6: fe80::6267:20ff:febd:5e4c/64 Scope:Lien
UP BROADCAST RUNNING MULTICAST MTU:1492 Metric:1
Packets reçus:161831 erreurs:0 :0 overruns:0 frame:0
TX packets:101552 errors:0 dropped:0 overruns:0 carrier:0
collisions:0 lg file transmission:1000
Octets reçus:195684887 (195.6 MB) Octets transmis:29360206 (29.3 MB)
命令iwconfig wlan0
wlan0 IEEE 802.11abgn
Mode:Managed Frequency:2.437 GHz Access Point: 00:26:4D:26:A1:2D
Bit Rate=54 Mb/s Tx-Power=15 dBm
Retry long limit:7 RTS thr:off Fragment thr:off
Encryption key:off
Power Management:off
Link Quality=52/70 Signal level=-58 dBm
Rx invalid nwid:0 Rx invalid crypt:0 Rx invalid frag:0
Tx excessive retries:0 Invalid misc:3791 Missed beacon:0
您知道造成这种疯狂缓慢的根本原因是什么吗?
答案1
在终端中尝试
sudo iwconfig wlan0 rate 54M
如果你尝试通过无线网络从笔记本电脑传输
- 您可以将 wlan0 更改为您需要编辑的任何网络,我认为它是无线的:)
请让我知道这可不可以帮你