使用 Cumulus Linux 进行收发器和线缆自认证

NVIDIA 提供本文档作为建议程序,用于将收发器模块或线缆认证为推荐的插拔式模块。 NVIDIA 不会主动阻止任何非推荐的插拔式模块工作,也不会限制使用自认证的插拔式模块。 希望使用非推荐插拔式模块的客户可以遵循本文档中概述的建议程序。 如果对未列出的插拔式模块有疑问,请联系您的 NVIDIA 销售团队。

连接示例

此程序适用于在接受测试的设备中认证所有类型的收发器和线缆。 客户可以为此测试选择相同类型或不同收发器的组合。

以下图示说明了一个示例,其中顶部和底部端口通过线缆环回连接。 该示例包括用于测试 40G QSFP 和 10/1G SFP 的布线和配置。 NVIDIA 建议您独立测试不同速度的组件。 示例中同时包含两者是为了简化演示。

Loopback cable port connections

TG-1/TG-2 可以是网络流量生成器(IXIA/Spirent 或同等产品),也可以是安装了 Linux 操作系统和 iperf3 免费流量生成器工具或同等工具的两台服务器。

Cumulus Linux 配置

使用以下网桥配置修改 /etc/network/interfaces 文件

auto trg_1
iface trg_1 inet manual
    bridge_ageing 150
    bridge_stp off
    bridge_ports swp41 swp52
    up ip link set trg_1 up

auto trg_2
iface trg_2 inet manual
    bridge_ageing 150
    bridge_stp off
    bridge_ports swp42 swp43
    up ip link set trg_2 up

auto l_1
iface l_1 inet manual
    bridge_ageing 150
    bridge_stp off
    bridge_ports swp51 swp50
    up ip link set l_1 up

auto l_2
iface l_2 inet manual
    bridge_ageing 150
    bridge_stp off
    bridge_ports swp49 swp48
    up ip link set l_2 up

auto l_3
iface l_3 inet manual
    bridge_ageing 150
    bridge_stp off
    bridge_ports swp47 swp46
    up ip link set l_3 up

auto l_4
iface l_4 inet manual
    bridge_ageing 150
    bridge_stp off
    bridge_ports swp45 swp44
    up ip link set l_4 up

在重新启动正在测试的交换机后,您应该看到以下网桥配置。 重新启动而不是重新加载配置可确保系统在启动时检测并正确配置所有光模块。

cumulus@switch~$ sudo brctl show
bridge name    bridge id                 STP enabled       interfaces
l_1            8000.443839002076         no                swp50
                                                           swp51
l_2            8000.443839002071         no                swp48
                                                           swp49
l_3            8000.44383900206f         no                swp46
                                                           swp47
L_4            8000.44383900206e         no                swp44
                                                           swp45
trg_1          8000.44383900206c         no                swp43
                                                           swp52
trg_2          8000.44383900206d         no                swp44
                                                           swp45

运行以下 Cumulus Linux 命令以验证所有环回链路均已启动

~$ sudo ethtool swp50
Settings for swp50:
               Supported ports: [ FIBRE ]
               Supported link modes:   10000baseT/Full
                                    40000baseT/Full
               Supported pause frame use: Symmetric Receive-only
               Supports auto-negotiation: Yes
               Advertised link modes:  1000baseT/Full
                                    10000baseT/Full
                                    40000baseT/Full
               Advertised pause frame use: Symmetric
               Advertised auto-negotiation: No
               Speed: 40000Mb/s
               Duplex: Full
               Port: FIBRE
               PHYAD: 0
               Transceiver: external
               Auto-negotiation: off
               Current message level: 0x00000000 (0)
                                                      
               Link detected: yes

从 Linux 服务器激活数据流量

配置连接到流量入口/出口端口的服务器接口,以在同一 IP 子网中设置 IPv4 地址。 例如

TG1$ sudo ifconfig eth1 101.0.1.1/24 up
TG2$ sudo ifconfig eth1 101.0.1.2/24 up

您可以尝试在这些接口之间使用 ping 或 ping –f (flood)。

要生成 iperf 流量,请使用如下选项(例如)

TG1$ sudo iperf -s -B 101.0.1.1 -p 9000
TG2$ sudo iperf -c 101.0.1.1 -i 3 -t 600 -p 9000 –d

其中

  • -B 绑定到接口
  • -p 是 TCP 端口号
  • -c 是 iperf 目标地址
  • -i 是屏幕打印间隔
  • -t 是测试持续时间,以秒为单位
  • -d 是双向流量

确认 ping 和 iperf 流量到达目标地址,并且带宽与预期速率相符(取决于收发器支持的速度和服务器 CPU)。 首先将两台服务器背靠背连接,以捕获基线服务器性能特征。

收发器模块信息(EEPROM 和 DOM)

使用以下 Cumulus Linux 命令检查每个收发器的 EEPROM 和数字光监控 (DOM) 信息

cumulus@switch~$ sudo ethtool –m swp<id>

基于 Cumulus Linux 的错误计数器检查

以下命令指示在测试期间和之后发生的错误和丢包计数器

cumulus@switch~$ sudo ethtool -S swp<id> | grep -i error
     HwIfInDot3LengthErrors: 0
     HwIfInErrors: 0
     SoftInErrors: 0
     SoftInFrameErrors: 0
     HwIfOutErrors: 0
     SoftOutErrors: 0

通过/失败标准

以下检查清单和测试计划构成成功的结果。

测试/检查

预期结果

注释

$ ping –f <dest IP>
% packets drop

TG1 和 TG2 的源 IP 和目标 IP

$ iperf TCP stream

当背靠背连接时,使用 Cumulus Linux snake 测试的双向流量与两个流量生成器端点的传输速率相匹配。

 
$ ethtool -S swp<id> | grep -i error

所有错误计数器均返回空值。

为了检测丢包或错误,请在发送流量之前收集 ethtool -S 的输出,然后在之后再次收集并进行比较,以查看计数器是否增加。

$ ethtool swp<id>

链路启动

 
$ ethtool -m swp<id>

返回 EEPROM 信息,例如供应商和设备类型。

DOM 信息对于收发器的成功自认证是可选的。 在某些情况下,ODM 供应商选择限制为 DOM 编程的信息。

$ sudo systemctl reset-failed switchd.service
$ sudo systemctl restart switchd.service

在 switchd 服务重启后,所有链路都恢复正常,流量恢复。

此测试确认 switchd 守护程序重启确实正确编程了所有必需的收发器设置。

重新启动交换机并再次重复相同的测试和检查点。

所有检查/测试迭代均成功。

在某些收发器的认证周期中,NVIDIA 观察到边缘和不合格的收发器在交换机重启时表现出 10-25% 的故障率。