今天搞网卡千兆,花费一天时间,不总结对不起自己,以下是ethtool的一些总结

ethtool -s speed 1000 duplex full autoneg off  ;强制千兆双工
ethtool eth0                                   ;查看eth0状态
ethtool -s eth0 advertise 0x020         ;设置为全双工1000M
可以设置的advertise参数:
advertise的值:
0x001    10 Half
0x002    10 Full
0x004    100 Half
0x008    100 Full
0x010    1000 Half(not supported by IEEE standards)
0x020    1000 Full
0x8000   2500 Full(not supported by IEEE standards)
0x800    10000 Full
0x03F    Auto
# 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 auto-negotiation: Yes
        Speed: 100Mb/s
        Duplex: Full
        Port: Twisted Pair
        PHYAD: 1
        Transceiver: internal
        Auto-negotiation: on
        Supports Wake-on: g
        Wake-on: d

                [ speed 10|100|1000|2500|10000 ]
                [ duplex half|full ]
                [ port tp|aui|bnc|mii|fibre ]
                [ autoneg on|off ]
                [ advertise %%x ]
                [ phyad %%d ]
                [ xcvr internal|external ]
                [ wol p|u|m|b|a|g|s|d… ]
                [ sopass %%x:%%x:%%x:%%x:%%x:%%x ]
                [ msglvl %%d ]

# ethtool –help
ethtool version 6
Usage:
ethtool DEVNAME Display standard information about device
         ethtool -s|–change DEVNAME    Change generic options
                [ speed 10|100|1000|2500|10000 ]
                [ duplex half|full ]
                [ port tp|aui|bnc|mii|fibre ]
                [ autoneg on|off ]
                [ advertise %%x ]
                [ phyad %%d ]
                [ xcvr internal|external ]
                [ wol p|u|m|b|a|g|s|d… ]
                [ sopass %%x:%%x:%%x:%%x:%%x:%%x ]
                [ msglvl %%d ]
         ethtool -a|–show-pause DEVNAME        Show pause options
         ethtool -A|–pause DEVNAME     Set pause options
                [ autoneg on|off ]
                [ rx on|off ]
                [ tx on|off ]
         ethtool -c|–show-coalesce DEVNAME     Show coalesce options
         ethtool -C|–coalesce DEVNAME  Set coalesce options
                [adaptive-rx on|off]
                [adaptive-tx on|off]
                [rx-usecs N]
                [rx-frames N]
                [rx-usecs-irq N]
                [rx-frames-irq N]
                [tx-usecs N]
                [tx-frames N]
                [tx-usecs-irq N]
                [tx-frames-irq N]
                [stats-block-usecs N]
                [pkt-rate-low N]
                [rx-usecs-low N]
                [rx-frames-low N]
                [tx-usecs-low N]
                [tx-frames-low N]
                [pkt-rate-high N]
                [rx-usecs-high N]
                [rx-frames-high N]
                [tx-usecs-high N]
                [tx-frames-high N]
                [sample-interval N]
         ethtool -g|–show-ring DEVNAME Query RX/TX ring parameters
         ethtool -G|–set-ring DEVNAME  Set RX/TX ring parameters
                [ rx N ]
                [ rx-mini N ]
                [ rx-jumbo N ]
                [ tx N ]
         ethtool -k|–show-offload DEVNAME      Get protocol offload information
         ethtool -K|–offload DEVNAME   Set protocol offload
                [ rx on|off ]
                [ tx on|off ]
                [ sg on|off ]
                [ tso on|off ]
                [ ufo on|off ]
                [ gso on|off ]
                [ gro on|off ]
         ethtool -i|–driver DEVNAME    Show driver information
         ethtool -d|–register-dump DEVNAME     Do a register dump
                [ raw on|off ]
                [ file FILENAME ]
         ethtool -e|–eeprom-dump DEVNAME       Do a EEPROM dump
                [ raw on|off ]
                [ offset N ]
                [ length N ]
         ethtool -E|–change-eeprom DEVNAME     Change bytes in device EEPROM
                [ magic N ]
                [ offset N ]
                [ value N ]
         ethtool -r|–negotiate DEVNAME Restart N-WAY negotation
         ethtool -p|–identify DEVNAME  Show visible port identification (e.g. blinking)
               [ TIME-IN-SECONDS ]
         ethtool -t|–test DEVNAME      Execute adapter self test
               [ online | offline ]
         ethtool -S|–statistics DEVNAME        Show adapter statistics
         ethtool -h|–help

关于鸡鸡哥的聪明伶俐的儿子和如花似玉的老婆

嗜抽烟,嗜吃肉,常睡觉晚起,熬夜,看新闻,喜体育栏目,会操作电脑,会操作服务器,能做些别人不屑于做的事情。厌做饭,恶洗碗,不洗澡,不刷牙,不剃胡须,不喜逛超市,重压之下偶去之,无上进心,无恒心,无毅力。 1988-1998年,虚度人生 2001-2013年,懵懵懂懂忽然就有孩子有老婆有,匆匆间父亲去世,匆匆半个人生没有了 2013- 知道自己需要什么,知道自己该做什么,知道自己的是个什么样的人,重新上路,明明白白活自己。 ------鸡鸡哥 2013.02.28 老了,以后得改称老鸡鸡哥了,继续努力吧 -----鸡鸡哥 20150517
此条目发表在系统管理分类目录,贴了, 标签。将固定链接加入收藏夹。

发表评论