网卡模式应用(ethtool)
时间:2010-09-21 来源:9ding
ethtool命令解释:
ethtool ethX //查询ethX网口基本设置 ethtool –h //显示ethtool的命令帮助(help) ethtool –i ethX //查询ethX网口的相关信息 ethtool –d ethX //查询ethX网口注册性信息 ethtool –r ethX //重置ethX网口到自适应模式 ethtool –S ethX //查询ethX网口收发包统计 ethtool –s ethX [speed 10|100|1000]\ //设置网口速率10/100/1000M [duplex half|full]\ //设置网口半/全双工 [autoneg on|off]\ //设置网口是否自协商 [port tp|aui|bnc|mii]\ //设置网口类型 [phyad N]\ [xcvr internal|exteral]\ [wol p|u|m|b|a|g|s|d...]\ [sopass xx:yy:zz:aa:bb:cc]\ [msglvl N]
以下的例子中,是一个有100BaseTX 网卡的系统,自动协商适应至10BaseTX 的情况.
# ethtool eth0 Settings for eth0: Supported ports: [ TP MII ] Supported link modes: 10baseT/Half 10baseT/Full 100baseT/Half 100baseT/Full Supports auto-negotiation: Yes Advertised link modes: 10baseT/Half 10baseT/Full 100baseT/Half 100baseT/Full Advertised auto-negotiation: Yes Speed: 10Mb/s Duplex: Half Port: MII PHYAD: 32 Transceiver: internal Auto-negotiation: on Supports Wake-on: pumbg Wake-on: d Current message level: 0×00000007 (7) Link detected: yes
以下示范例子中,如何强制网卡速率调整至100BaseTX
# ethtool -s eth0 speed 100 duplex full autoneg off # ethtool eth0 Settings for eth0: Supported ports: [ TP MII ] Supported link modes: 10baseT/Half 10baseT/Full 100baseT/Half 100baseT/Full Supports auto-negotiation: Yes Advertised link modes: 10baseT/Half 10baseT/Full 100baseT/Half 100baseT/Full Advertised auto-negotiation: No Speed: 100Mb/s Duplex: Full Port: MII PHYAD: 32 Transceiver: internal Auto-negotiation: off Supports Wake-on: pumbg Wake-on: d Current message level: 0×00000007 (7) Link detected: yes
相关阅读 更多 +