在公司下载代码的时候,发现自己的速率只有10M左右,太慢了~,而且同步代码更是巨卡。
在网上查看原因没找到,后来经过公司的IT来看,说是我的网络设置有问题,看他在那里忙活了一会,就ok了。我看到它使用了ethtool 这个命令,于是乎,我自己就在网上查了查,了解了一下并实践了一下,感觉还是写到这里,做个备注吧。下面的内容都是来自网络。

使用ethtool

第一次使用可能需要你安装,按照提示安装即可
其中比较常用的就是 -s 参数
用ethtool设置网卡的速度参数
ethtool -s 【网卡名】【速度设置】【工作模式】【是否自适应】
Example

ethtool -s eth0 speed 1000 duplex full autoneg on
root@CP-PC-0056:~# ethtool eth0
Settings for eth0:Supported ports: [ TP MII ]Supported link modes:   10baseT/Half 10baseT/Full 100baseT/Half 100baseT/Full 1000baseT/Half 1000baseT/Full Supported pause frame use: NoSupports auto-negotiation: YesAdvertised link modes:  10baseT/Half 10baseT/Full 100baseT/Half 100baseT/Full 1000baseT/Full Advertised pause frame use: Symmetric Receive-onlyAdvertised auto-negotiation: YesLink partner advertised link modes:  10baseT/Half 10baseT/Full 100baseT/Half 100baseT/Full 1000baseT/Full Link partner advertised pause frame use: NoLink partner advertised auto-negotiation: YesSpeed: 1000Mb/sDuplex: FullPort: MIIPHYAD: 0Transceiver: internalAuto-negotiation: onSupports Wake-on: pumbgWake-on: gCurrent message level: 0x00000033 (51)drv probe ifdown ifupLink detected: yes

想了解更多,我们可以查看帮组信息,能够得到下面一大坨信息:

root@CP-PC-0056:~# ethtool -h
ethtool version 3.13
Usage:ethtool DEVNAME Display standard information about deviceethtool -s|--change DEVNAME Change generic options[ speed %d ]    #设置速率[ duplex half|full ] #设置工作模式【半双工or全双工】[ port tp|aui|bnc|mii|fibre ][ mdix auto|on|off ][ 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 | msglvl type on|off ... ]ethtool -a|--show-pause DEVNAME Show pause optionsethtool -A|--pause DEVNAME  Set pause options[ autoneg on|off ][ rx on|off ][ tx on|off ]ethtool -c|--show-coalesce DEVNAME  Show coalesce optionsethtool -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 parametersethtool -G|--set-ring DEVNAME   Set RX/TX ring parameters[ rx N ][ rx-mini N ][ rx-jumbo N ][ tx N ]ethtool -k|--show-features|--show-offload DEVNAME   Get state of protocol offload and other featuresethtool -K|--features|--offload DEVNAME Set protocol offload and other featuresFEATURE on|off ...ethtool -i|--driver DEVNAME Show driver informationethtool -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 ][ length N ][ value N ]ethtool -r|--negotiate DEVNAME  Restart N-WAY negotiationethtool -p|--identify DEVNAME   Show visible port identification (e.g. blinking)[ TIME-IN-SECONDS ]ethtool -t|--test DEVNAME   Execute adapter self test[ online | offline | external_lb ]ethtool -S|--statistics DEVNAME Show adapter statisticsethtool -n|-u|--show-nfc|--show-ntuple DEVNAME  Show Rx network flow classification options or rules[ rx-flow-hash tcp4|udp4|ah4|esp4|sctp4|tcp6|udp6|ah6|esp6|sctp6 |rule %d ]ethtool -N|-U|--config-nfc|--config-ntuple DEVNAME  Configure Rx network flow classification options or rulesrx-flow-hash tcp4|udp4|ah4|esp4|sctp4|tcp6|udp6|ah6|esp6|sctp6 m|v|t|s|d|f|n|r... |flow-type ether|ip4|tcp4|udp4|sctp4|ah4|esp4[ src %x:%x:%x:%x:%x:%x [m %x:%x:%x:%x:%x:%x] ][ dst %x:%x:%x:%x:%x:%x [m %x:%x:%x:%x:%x:%x] ][ proto %d [m %x] ][ src-ip %d.%d.%d.%d [m %d.%d.%d.%d] ][ dst-ip %d.%d.%d.%d [m %d.%d.%d.%d] ][ tos %d [m %x] ][ l4proto %d [m %x] ][ src-port %d [m %x] ][ dst-port %d [m %x] ][ spi %d [m %x] ][ vlan-etype %x [m %x] ][ vlan %x [m %x] ][ user-def %x [m %x] ][ dst-mac %x:%x:%x:%x:%x:%x [m %x:%x:%x:%x:%x:%x] ][ action %d ][ loc %d]] |delete %dethtool -T|--show-time-stamping DEVNAME Show time stamping capabilitiesethtool -x|--show-rxfh-indir DEVNAME    Show Rx flow hash indirectionethtool -X|--set-rxfh-indir DEVNAME Set Rx flow hash indirectionequal N | weight W0 W1 ...ethtool -f|--flash DEVNAME  Flash firmware image from the specified file to a region on the deviceFILENAME [ REGION-NUMBER-TO-FLASH ]ethtool -P|--show-permaddr DEVNAME  Show permanent hardware addressethtool -w|--get-dump DEVNAME   Get dump flag, data[ data FILENAME ]ethtool -W|--set-dump DEVNAME   Set dump flag of the deviceNethtool -l|--show-channels DEVNAME  Query Channelsethtool -L|--set-channels DEVNAME   Set Channels[ rx N ][ tx N ][ other N ][ combined N ]ethtool --show-priv-flags DEVNAME   Query private flagsethtool --set-priv-flags DEVNAME    Set private flagsFLAG on|off ...ethtool -m|--dump-module-eeprom|--module-info DEVNAME   Query/Decode Module EEPROM information and optical diagnostics if available[ raw on|off ][ hex on|off ][ offset N ][ length N ]ethtool --show-eee DEVNAME  Show EEE settingsethtool --set-eee DEVNAME   Set EEE settings[ eee on|off ][ advertise %x ][ tx-lpi on|off ][ tx-timer %d ]ethtool -h|--help       Show this helpethtool --version       Show version number

ubuntu设置网卡速率相关推荐

  1. 使用mii-tool设置网卡速率

    转载:http://washion2008.blog.163.com/blog/static/144227201001711537158/ 在ubuntu中,mii-tool 是属于net-tools ...

  2. linux设置网卡速率

    ethtool # ethtool ethX //查询ethX网口基本设置 # ethtool –h //显示ethtool的命令帮助(help) # ethtool –i ethX //查询ethX ...

  3. linux修改网卡频率,Linux 设置网卡速率

    1. 查看网卡的工作模式,输入命令: #mii-tool -v eth0: negotiated 100baseTx-FD,link ok product info:Vendor 00:05:be,m ...

  4. ubuntu设置网卡默认启动_ubuntu 网络配置

    检查网络配置命令:ifconfig 一.通过配置文件配置 新手没怎么用过Ubuntu,所以走了不少弯路,网上找了很多方法,大都没对我起到帮助作用,所以把自己的配置方法写一写. Ubuntu上连了两块网 ...

  5. ubuntu设置网卡默认启动_Ubuntu18.04 配置网卡上网

    2019/10/29, Ubuntu Server 18.04 摘要:Ubuntu Server 18.04 采用netplan作为网络配置管理,修改IP使其连上网络 修改网卡配置 首先使用ip a查 ...

  6. Solaris 使用ndd指令设置网卡速率

    转自http://blog.csdn.net/compard/article/details/1905528 1.察看网卡相关参数 ndd -get /dev/bge0<arg>察看当前参 ...

  7. Ubuntu 设置网卡固定IP

    配置文件在/etc/network/interfaces cd /etc/network/ sudo vi interfaces 需要修改权限,否则无法保存 ls –l 默认为644 sudo chm ...

  8. ubuntu设置网卡默认启动_Ubuntu配置网卡IP地址

    Ubuntu Desktop14.04  ,在window7 下的vmware14虚拟机中 cat  /etc/network/interfaces 默认已经有lo: 系统给定的网络回环接口 eth0 ...

  9. ubuntu设置网卡默认启动_ubuntu配置网卡的办法

    常见问题 1. 为什么要配置网卡 因为如果没有配置好网卡,那么就无法正常上网或者与其他的电脑通讯 2.常见的错误有: ping任意地址时出现报错 network is unreachable 或者是在 ...

最新文章

  1. linux apache web服务器
  2. ARM汇编学习之寄存器 之PC
  3. pythonidle新建文件_(一)Python入门:04IDLE开发环境的使用-建立Python源文件
  4. openssl+poly1305+sm4实现
  5. [Python图像识别] 四十六.图像预处理之图像去雾详解(ACE算法和暗通道先验去雾算法)
  6. abp的权限与导航菜单的关系
  7. .Net对SQL数据库的web备份
  8. Go程序开发---Go环境配置:CentOS6.5+Go1.8标准包安装
  9. 说下List接口下的那些类
  10. 关于java前端与后端的技术和工资对比!
  11. ghost 通过docker安装
  12. 安卓控制新大陆云平台(三)
  13. 面试算法:利用堆栈计算逆向波兰表达式
  14. 香港资深艺人沈殿霞病逝 享年60岁(图)
  15. 用了python抢购京东茅台脚本,为什么你还是抢不到茅台?教你这样设置时间,提升成功概率
  16. wIN 7 一键清理垃圾
  17. 【第84期】对话智能风控
  18. ZZULI - 小新三连(二):小新在努力
  19. Jeesite 4.0 学习笔记
  20. 超详细的集合思维导图

热门文章

  1. 免费润色文章的软件-自动修改文章润色的软件
  2. bmp图片在arm开发板显示
  3. JavaScript的if的分支语句
  4. [转载] GLSL基础篇
  5. Win10如何升级Win11 22H2?Win10安装升级Win11 22H2教学
  6. python生日源代码_生日小助手源码运行的步骤
  7. motan zookeeper
  8. LCD12864常用管脚
  9. word文件有密码如何解开
  10. 假设无线打印服务器,如何给我的usb接口的打印机改装成通过wifi连接的打印机...