介绍下查看服务器的网卡设备,当前连接速度,速度调节的方法。
服务器网卡信息如下,千兆网卡,但实际的连接速度只有百兆,作为存储服务器,有点说不过去啊。
复制代码 代码示例:
[root@jbxue ~]# ethtool
eth0
Settings for eth0:
Supported ports: [ TP ]
Supported link modes: 10baseT/Half 10baseT/Full
100baseT/Half 100baseT/Full
1000baseT/Full
Supports auto-negotiation: Yes
Adverti
sed link modes: 10baseT/Half 10baseT/Full
100baseT/Half 100baseT/Full
1000baseT/Full
Advertised pause frame use: No
Advertised auto-negotiation: Yes
Speed: 100Mb/s
Duplex: Full
Port: Twisted Pair
PHYAD: 1
Transceiver: internal
Auto-negotiation: on
MDI-X: Unknown
Supports Wake-on: g
Wake-on: g
Link detected: yes
使用ethtool进行设置,可是设置完成后速度并没有变化。
复制代码 代码示例:
[root@jbxue ~]# ethtool -s eth0 speed 1000
[root@jbxue ~]# ethtool eth0
Settings for eth0:
Supported ports: [ TP ]
Supported link modes: 10baseT/Half 10baseT/Full
100baseT/Half 100baseT/Full
1000baseT/Full
Supports auto-negotiation: Yes
Advertised link modes: 10baseT/Half 10baseT/Full
100baseT/Half 100baseT/Full
1000baseT/Full
Advertised pause frame use: No
Advertised auto-negotiation: Yes
Speed: 100Mb/s
Duplex: Full
Port: Twisted Pair
PHYAD: 1
Transceiver: internal
Auto-negotiation: on
MDI-X: Unknown
Supports Wake-on: g
Wake-on: g
Link detected: yes
然后,使用命令ethtool -s eth0 duplex full autoneg off speed 1000
报参数错误,多次折腾后发现使用ethtool -s eth0 autoeng off后,可以设置使用命令 ethtool -s eth0 speed N设置网速为10或100,但改为1000时报参数错误。
最后确认是网络的问题,问题出在了物理层上,呵呵。