修改Linux网卡连接速度

sunnyu 2014-11-23 21:47:21 累计浏览 3,997 次

   发现内网一台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. NGINX Gateway Fabric 2.8: IP allow and deny lists, passive health checks, and cookie-based session persistence (2026-11-14 01:10:02)
  2. NGINX Ingress Controller 5.7: HTTP/2 to your upstreams, Opaque Secrets, and cert-manager challenges behind HTTPS redirects (2026-11-14 00:10:02)
  3. Hexo 文章一键发布到微信公众号 (2026-11-13 19:10:02)

查看更多 DevOps 文章 →

建议继续学习

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