IT技术博客大学习 共学习 共进步
全部 移动开发 后端 数据库 AI 算法 安全 DevOps 前端 设计 开发者

修改Linux网卡连接速度

sunnyu 2014-11-23 21:47:21 累计浏览 3,800 次
本机暂存

   发现内网一台Linux服务器向上传输文件时候速度很慢,只有1mb每秒,怀疑网卡运行模式不对,

   使用如下命令查看当前网卡运行模式

ethtool eth0

   得到信息

Settings for eth0:
        Supported ports: [ TP ]
        Supported link modes:   10baseT/Half 10baseT/Full
                                100baseT/Half 100baseT/Full
        Supported pause frame use: No
        Supports auto-negotiation: Yes
        Advertised link modes:  10baseT/Half 10baseT/Full
                                100baseT/Half 100baseT/Full
        Advertised pause frame use: No
        Advertised auto-negotiation: Yes
        Speed: 10Mb/s
        Duplex: Full
        Port: Twisted Pair
        PHYAD: 0
        Transceiver: internal
        Auto-negotiation: on
        MDI-X: Unknown
        Supports Wake-on: g
        Wake-on: d
        Current message level: 0x00000000 (0)

        Link detected: yes

   发现网卡是运行在低速的10mb模式下,使用如下命令调整网卡模式未100mb全双工

ethtool -s eth0 speed 100 duplex fullethtool -s eth0 speed 100 duplex full

   再次查看网卡得到信息如下

Settings for eth0:
        Supported ports: [ TP ]
        Supported link modes:   10baseT/Half 10baseT/Full
                                100baseT/Half 100baseT/Full
        Supported pause frame use: No
        Supports auto-negotiation: Yes
        Advertised link modes:  100baseT/Full
        Advertised pause frame use: No
        Advertised auto-negotiation: Yes
        Speed: 100Mb/s
        Duplex: Full
        Port: Twisted Pair
        PHYAD: 0
        Transceiver: internal
        Auto-negotiation: on
        MDI-X: Unknown
        Supports Wake-on: g
        Wake-on: d
        Current message level: 0x00000000 (0)

        Link detected: yes

   测试文件传输,达到每秒10mb,速度正常

同分类推荐文章

  1. 从零重建 macOS 开发机:可复现的环境初始化流程 (2026-06-14 20:36:00)
  2. 百度物理网络监控工具开源第二弹:毫秒级监控工具 baize,让你的网络问题无处遁形 (2026-06-11 08:10:28)
  3. How to Set Up Homebrew Tap for Private CLI Tools: A Complete Guide (2026-05-27 02:13:03)

查看更多 DevOps 文章 →

建议继续学习

  1. 如何成为Python高手 (累计阅读 54,992)
  2. Linux如何统计进程的CPU利用率 (累计阅读 16,308)
  3. 我的 RHCA 之路 (累计阅读 14,013)
  4. Linux内存点滴 用户进程内存空间 (累计阅读 13,231)
  5. 给程序员新手的一些建议 (累计阅读 13,089)
  6. Linux 性能监控、测试、优化工具 (累计阅读 13,011)
  7. 关于linux内存free的一些事情 (累计阅读 12,867)
  8. include(“./file.php”)和include(“file.php”)区别 (累计阅读 12,789)
  9. ps - 按进程消耗内存多少排序 (累计阅读 12,689)
  10. Google怎么用linux (累计阅读 12,581)