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

2016-06-16 10:42:24 +08:00
 millken

现在测试服务器有 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 ,我想问下如何让这里的千兆变成万兆?

7166 次点击
所在节点    Linux
2 条回复
fangjinmin
2016-06-16 12:06:25 +08:00
感觉操作流程没有问题。
查一查是不是会是驱动的问题吧。
millken
2016-06-16 12:14:11 +08:00
经过同事确认是网口模块问题,上的都是千兆模块。
已在网上下单购买了 Intel 万兆模块。

这是一个专为移动设备优化的页面(即为了让你能够在 Google 搜索结果里秒开这个页面),如果你希望参与 V2EX 社区的讨论,你可以继续到 V2EX 上打开本讨论主题的完整版本。

https://www.v2ex.com/t/286100

V2EX 是创意工作者们的社区,是一个分享自己正在做的有趣事物、交流想法,可以遇见新朋友甚至新机会的地方。

V2EX is a community of developers, designers and creative people.

© 2021 V2EX