Chinaunix首页 | 论坛 | 博客
  • 博客访问: 190545
  • 博文数量: 36
  • 博客积分: 1952
  • 博客等级: 上尉
  • 技术积分: 485
  • 用 户 组: 普通用户
  • 注册时间: 2010-01-08 22:30
文章存档

2011年(1)

2010年(35)

分类: LINUX

2010-09-21 10:20:21

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
 
阅读(1837) | 评论(1) | 转发(0) |
给主人留下些什么吧!~~

chinaunix网友2010-09-21 16:14:53

很好的, 收藏了 推荐一个博客,提供很多免费软件编程电子书下载: http://free-ebooks.appspot.com