停止使用自动协商,并指定链接速度

非常感谢 gmt-24.net 提供的Red Hat接口配置文件。
在Debian中,传输速度一直只有300kb/s,在半年里一直不知道原因是什么。
经过使用ethtool进行确认,发现以100M Half的设置运行着,所以通过以下配置将其改为100M Full,结果传输速度提升至1.8Mb/s,问题得到改善。

对于Debian系统来说

 auto eth0
 iface eth0 inet static
+  pre-up /usr/sbin/ethtool -s eth0 autoneg off speed 100 duplex full
   address 192.168.12.2
   netmask 255.255.255.0
   gateway 192.168.12.1

对于CentOS的情况

 DEVICE=eth0
 BOOTPROTO=static
 IPADDR=192.168.12.2
 NETMASK=255.255.255.0
 ONBOOT=yes
+ETHTOOL_OPTS="autoneg off speed 1000 duplex full"

之后,通过将网络设备设置从100Full固定改为auto,服务器端也采用了auto设置,以达到8.9MB/s的速度。

/usr/sbin/ethtool -s eth0 autoneg on