聚合国内IT技术精华文章,分享IT技术精华,帮助IT从业人士成长

修改Linux网卡连接速度

2014-02-20 17:25 浏览: 1360882 次 我要评论(0 条) 字号:

发现内网一台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,速度正常



网友评论已有0条评论, 我也要评论

发表评论

*

* (保密)

Ctrl+Enter 快捷回复