IT技术博客大学习 共学习 共进步

修改Linux网卡连接速度

sunnyu 2014-11-23 21:47:21 浏览 3,722 次

   发现内网一台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. 如何查看Linux 硬件配置信息 (阅读 7,105)
  2. Linux find命令的速度 (阅读 5,944)
  3. 如何设置双网卡路由 (阅读 5,544)
  4. 哇,让你的DB再快一倍:ext4 vs xfs对比测试 (阅读 5,283)
  5. php获取网卡MAC地址类 (阅读 4,686)
  6. MYSQL数据库网卡软中断不平衡问题及解决方案 (阅读 4,663)
  7. linux双网卡双网关,不同IP段的设置 (阅读 4,082)
  8. Intel 10-GbE 网卡性能优化[翻译] (阅读 3,941)
  9. linux中为何没有网卡设备文件 (阅读 3,742)
  10. 提高网站访问速度的十个技巧 (阅读 3,600)