V2EX = way to explore
V2EX 是一个关于分享和探索的地方
现在注册
已注册用户请  登录
Distributions
Ubuntu
Fedora
CentOS
中文资源站
网易开源镜像站
millken
V2EX  ›  Linux

如何设置服务器网卡千兆变万兆

  •  
  •   millken ·
    millken · 2016-06-16 10:42:24 +08:00 · 7159 次点击
    这是一个创建于 2861 天前的主题,其中的信息可能已经有所发展或是发生改变。

    现在测试服务器有 3 个网卡,一个千兆,两个万兆自适应,如下:

    # lspci  -tv
    -[0000:00]-+-00.0  Intel Corporation 5000X Chipset Memory Controller Hub
               +-02.0-[04-09]--+-00.0-[05-08]--+-00.0-[06-07]----00.0-[07]----00.0  Broadcom Corporation NetXtreme II BCM5708 Gigabit Ethernet
               |               |               \-01.0-[08]--
               |               \-00.3-[09]--
               +-03.0-[01]----00.0  LSI Logic / Symbios Logic SAS1068E PCI-Express Fusion-MPT SAS
               +-04.0-[0a]--+-00.0  Intel Corporation 82599ES 10-Gigabit SFI/SFP+ Network Connection
               |            \-00.1  Intel Corporation 82599ES 10-Gigabit SFI/SFP+ Network Connection
               +-05.0-[0b]--
               +-06.0-[0c]--+-00.0  Intel Corporation 82599ES 10-Gigabit SFI/SFP+ Network Connection
               |            \-00.1  Intel Corporation 82599ES 10-Gigabit SFI/SFP+ Network Connection
    

    两个万兆口通过光纤直连,千兆口与外网通信。

    其中一个万兆口的设置如下:

    # ethtool eth2
    Settings for eth2:
            Supported ports: [ FIBRE ]
            Supported link modes:   1000baseT/Full 
                                    10000baseT/Full 
            Supported pause frame use: No
            Supports auto-negotiation: Yes
            Advertised link modes:  1000baseT/Full 
            Advertised pause frame use: No
            Advertised auto-negotiation: Yes
            Speed: 1000Mb/s
            Duplex: Full
            Port: FIBRE
            PHYAD: 0
            Transceiver: external
            Auto-negotiation: on
            Supports Wake-on: d
            Wake-on: d
            Current message level: 0x00000007 (7)
                                   drv probe link
    

    可以看到当前速率是 1000Mb ,这是测试发包没问题,基本达到 1000M 的线速

    Speed: 1.420 Mpps Bandwidth: 727.219 Mbps (raw 999.926 Mbps). Average batch: 256.20 pkts
    

    我想让他变成 10000Mb ,使用

    ethtool -s eth0 autoneg off speed 10000 duplex full
    
    # ethtool eth2
    Settings for eth2:
            Supported ports: [ FIBRE ]
            Supported link modes:   1000baseT/Full 
                                    10000baseT/Full 
            Supported pause frame use: No
            Supports auto-negotiation: Yes
            Advertised link modes:  10000baseT/Full 
            Advertised pause frame use: No
            Advertised auto-negotiation: Yes
            Speed: Unknown!
            Duplex: Unknown! (255)
            Port: FIBRE
            PHYAD: 0
            Transceiver: external
            Auto-negotiation: on
            Supports Wake-on: d
            Wake-on: d
            Current message level: 0x00000007 (7)
                                   drv probe link
            Link detected: no
    

    speed 变成了 Unknown ,测试发包会报错。 因为驱动也是 ixgbe ,我想问下如何让这里的千兆变成万兆?

    fangjinmin
        1
    fangjinmin  
       2016-06-16 12:06:25 +08:00
    感觉操作流程没有问题。
    查一查是不是会是驱动的问题吧。
    millken
        2
    millken  
    OP
       2016-06-16 12:14:11 +08:00
    经过同事确认是网口模块问题,上的都是千兆模块。
    已在网上下单购买了 Intel 万兆模块。
    关于   ·   帮助文档   ·   博客   ·   API   ·   FAQ   ·   我们的愿景   ·   实用小工具   ·   1367 人在线   最高记录 6543   ·     Select Language
    创意工作者们的社区
    World is powered by solitude
    VERSION: 3.9.8.5 · 21ms · UTC 23:46 · PVG 07:46 · LAX 16:46 · JFK 19:46
    Developed with CodeLauncher
    ♥ Do have faith in what you're doing.