![Linux 中的 LAN 带宽较低](https://linux22.com/image/607510/Linux%20%E4%B8%AD%E7%9A%84%20LAN%20%E5%B8%A6%E5%AE%BD%E8%BE%83%E4%BD%8E.png)
大家好,我连接了两台电脑,两台电脑都带1000Mbps网卡,一台电脑(A)运行Fedora 8,另一台电脑(B)运行Windows7。我用Ixchariot测试两台电脑之间的带宽,显示大约10Mbps。如果A和B都运行Windows7,我再运行Ixchariot,显示大约1000Mbps。我从B向A(Fedora 8)传输文件,速度大约是10Mbps。为什么两次测试的带宽不同?
以下是 ifconfig 和 ethtool 的输出:
[root@Dom1 ~]# ifconfig
eth0 Link encap:Ethernet HWaddr 00:24:1D:50:B9:C0
inet addr:192.168.1.101 Bcast:192.168.1.255 Mask:255.255.255.0
inet6 addr: fe80::224:1dff:fe50:b9c0/64 Scope:Link
UP BROADCAST RUNNING MULTICAST MTU:1500 Metric:1
RX packets:290214 errors:0 dropped:889731948 overruns:0 frame:0
TX packets:579263 errors:0 dropped:0 overruns:0 carrier:0
collisions:0 txqueuelen:1000
RX bytes:19165638 (18.2 MiB) TX bytes:875177493 (834.6 MiB)
Interrupt:17 Base address:0xc000
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:16436 Metric:1
RX packets:4932 errors:0 dropped:0 overruns:0 frame:0
TX packets:4932 errors:0 dropped:0 overruns:0 carrier:0
collisions:0 txqueuelen:0
RX bytes:5011460 (4.7 MiB) TX bytes:5011460 (4.7 MiB)
[root@Dom1 ~]# ethtool -S eth0
NIC statistics:
tx_packets: 816440
rx_packets: 409104
tx_errors: 0
rx_errors: 0
rx_missed: 0
align_errors: 0
tx_single_collisions: 0
tx_multi_collisions: 0
unicast: 408962
broadcast: 38
multicast: 142
tx_aborted: 0
tx_underrun: 0
[root@Dom1 ~]# ethtool eth0
Settings for eth0:
Supported ports: [ FIBRE ]
Supported link modes: 1000baseT/Full
Supports auto-negotiation: Yes
Advertised link modes: Not reported
Advertised auto-negotiation: Yes
Speed: 1000Mb/s
Duplex: Full
Port: FIBRE
PHYAD: 0
Transceiver: internal
Auto-negotiation: on
Supports Wake-on: pumbg
Wake-on: g
Current message level: 0x00000033 (51)
Link detected: yes
[root@Dom1 ~]# ethtool -i eth0
driver: r8169
version: 2.2LK-NAPI
firmware-version:
bus-info: 0000:03:00.0
答案1
您的 NIC 或驱动程序确实有问题。ifconfig
报告RX 数据包:290214 错误:0 丢弃:889731948 超限:0 帧:0因此几乎有 9 亿个数据包被丢弃,只有 30 万个数据包被接收!这真是太庞大了!
尝试调查日志(/var/log/messages
和的输出dmesg
)。