您的位置:首页 > 运维架构 > Linux

linux查看网卡速度和模式调整

2016-08-02 16:05 501 查看
[root@c02b03 ~]#  ethtool eth0
Settings for eth0:
Supported ports: [ FIBRE ]
Supported link modes:   1000baseT/Full
Supports auto-negotiation: Yes
Advertised link modes:  1000baseT/Full
Advertised pause frame use: Symmetric
Advertised auto-negotiation: Yes
Speed: Unknown!
Duplex: Unknown! (255)
Port: FIBRE
PHYAD: 0
Transceiver: internal
Auto-negotiation: on
Supports Wake-on: pumbg
Wake-on: g
Current message level: 0x00000003 (3)
Link detected: no
[root@c02b03 ~]#  ethtool eth1
Settings for eth1:
Supported ports: [ FIBRE ]
Supported link modes:   1000baseT/Full
Supports auto-negotiation: Yes
Advertised link modes:  1000baseT/Full
Advertised pause frame use: Symmetric
Advertised auto-negotiation: Yes
Speed: 1000Mb/s
Duplex: Full
Port: FIBRE
PHYAD: 0
Transceiver: internal
Auto-negotiation: on
Supports Wake-on: d
Wake-on: d
Current message level: 0x00000003 (3)
Link detected: yes


或者老的mii-tool命令(但是该命令似乎只能识别100M及以下网卡)亦可。

其中, Duplex: Full表示全双工(FD),half表示半双工(HD), Auto-negotiation
后边表示是否自动协商

可以通过修改/etc/sysconfig/network-scripts/ifcfg-eth0文件中的

ETHTOOL_OPTS="speed 100 duplex full autoneg off"
参数进行设置,使用ifup和ifdown来测试
内容来自用户分享和网络整理,不保证内容的准确性,如有侵权内容,可联系管理员处理 点击这里给我发消息
标签: