各 NOS 端口配置方法:速率、FEC、breakout 与强制覆盖 · 光模块兼容性 · 网卡与交换机 · 文档 · CodingBox
CodingBox 文档

各 NOS 端口配置方法:速率、FEC、breakout 与强制覆盖

模块被接受之后,还需要告诉端口该怎么处理它:用什么速率、用什么 FEC、是否自动协商、是否拆分,以及——在严格的平台上——是否容忍第三方身份。命令因 NOS 而异,往往还因平台和版本而异。本页把常见系统的代表性命令并列列出;把它们当作配置什么的地图,具体语法请在平台的指南中确认。

两端必须一致的设置

设置原因常见陷阱
速率SerDes 通道速率必须与模块速率一致25G 端口配 10G 模块,或双速率模块停在错误的速率上(速率)
FEC多数 25G+ PMD 上强制要求;两端必须使用相同的编码一端 RS-FEC,另一端无 FEC:光功率正常但无链路(FEC 与 AN)
自动协商 / 链路训练25G+ 的 DAC 上必须开启,多数光模块上禁止光模块上留了 AN,或 DAC 上关闭了 AN
拆分父端口拆分为子端口只在一端配置,或用在 WDM 光模块上
介质 / 模式combo 端口,铜口 SFP 上 SGMII 与 1000BASE-X 的选择生效的介质类型不对
第三方绕过严格平台上的策略开关模块本身没问题,端口却 errdisabled(厂商锁定)

按 NOS 分类的配置

尖括号表示占位符;… 表示因平台而异的部分。

Cisco IOS-XE(Catalyst)

interface TwentyFiveGigE1/0/1
 speed 10000                       ! 或 25000(平台允许按端口设置速率时)
 fec cl74                          ! cl74 = BASE-R,cl91/cl108 = RS-FEC,off
 no negotiation auto               ! 光模块;DAC 保持 auto
service unsupported-transceiver    ! 全局命令,多数版本中为隐藏命令
no errdisable detect cause gbic-invalid
errdisable recovery cause gbic-invalid
show interfaces transceiver detail

Cisco NX-OS(Nexus)

interface Ethernet1/1
 speed 25000
 fec rs-fec                        ! rs-fec | fc-fec | off | auto
 no negotiate auto
interface breakout module 1 port 1-4 map 25g-4x     ! 或:hw-module breakout …(较旧版本)
service unsupported-transceiver
show interface ethernet1/1 transceiver details

Cisco IOS-XR

controller Optics0/0/0/0
 breakout 4x25                     ! 或:hw-module port-range 0 3 location … mode 4x25
interface HundredGigE0/0/0/0
 fec standard | none
show controllers optics 0/0/0/0

Arista EOS

interface Ethernet1
   speed forced 25gfull            ! forced 10000full, 40gfull, 100gfull …
   error-correction encoding reed-solomon    ! fire-code | disabled
   no negotiation
interface Ethernet33/1-4           ! 拆分:在 /1-/4 子端口上配置速率
   speed forced 25gfull
hardware port-group 1 select Et33/1-4        ! 部分平台
transceiver qsfp default-mode 4x10G          ! QSFP+ 端口的默认模式
show interfaces transceiver dom

Juniper Junos (QFX/EX)

set chassis fpc 0 pic 0 port 0 channel-speed 25g       ! QFX 上的 breakout 4x25G
set chassis fpc 0 pic 0 port 48 speed 10g               ! 部分型号上按端口设置速率
set interfaces et-0/0/0 gigether-options fec fec91      ! fec74 | fec91 | none
set interfaces et-0/0/0 ether-options no-auto-negotiation
show interfaces diagnostics optics et-0/0/0
show chassis pic fpc-slot 0 pic-slot 0                  ! 列出"unsupported"光模块

Huawei VRP (CloudEngine)

interface 25GE1/0/1
 port mode 10GE                    ! 或:S 系列上用 speed 10000
 fec-mode rs-fec                   ! base-r | rs-fec | none(因平台而异)
 negotiation auto disable
port split dimension interface 100GE1/0/1 split-type 4*25GE     ! 拆分,部分设备需要 commit/重启
transceiver phony-alarm-disable    ! 系统视图:抑制非华为光模块告警
display transceiver interface 25GE1/0/1 verbose

H3C Comware

interface Twenty-FiveGigE1/0/1
 using tengige                     ! 切换端口模式
 port fec mode rs-fec              ! (语法因设备而异)
transceiver phony-alarm-disable
display transceiver interface Twenty-FiveGigE1/0/1

HPE Aruba AOS-CX / AOS-S

! AOS-CX
interface 1/1/49
    speed 25000-full
    error-control rs-fec           ! 或:fec …(因平台而异)
allow-unsupported-transceiver
show interface 1/1/49 transceiver detail
! AOS-S(ProCurve)
allow-unsupported-transceiver
show interfaces transceiver detail

Dell OS10

interface breakout 1/1/1 map 25g-4x
interface ethernet1/1/1:1
 speed 25000
 fec CL91                          ! CL74 | CL91 | CL108 | off
 no negotiation
show interface ethernet 1/1/1:1 transceiver

SONiC

config interface speed Ethernet0 25000
config interface fec Ethernet0 rs           ! rs | fc | none
config interface autoneg Ethernet0 disabled
config interface breakout Ethernet0 4x25G   ! 动态端口拆分(取决于平台支持)
show interfaces transceiver eeprom -d Ethernet0
show interfaces status

Nvidia Cumulus (NVUE)

nv set interface swp1 link speed 25G
nv set interface swp1 link fec rs
nv set interface swp1 link auto-negotiate off
nv set interface swp1 link breakout 4x25G
nv config apply
l1-show swp1

MikroTik RouterOS

/interface ethernet set sfp-sfpplus1 auto-negotiation=no speed=10G-baseSR-LR
/interface ethernet set sfp28-1 fec-mode=fec91          ! fec74 | fec91 | off | auto
/interface ethernet monitor sfp-sfpplus1

Linux 主机(服务器网卡)

ethtool -s eth0 speed 25000 duplex full autoneg off
ethtool --set-fec eth0 encoding rs             # rs | baser | off | auto
ethtool -m eth0                                # 身份信息和 DDM
# Intel ixgbe/i40e:允许非 Intel SFP(模块参数;请查阅驱动文档)
modprobe ixgbe allow_unsupported_sfp=1

验证结果

  1. 两端链路都在预期速率下 up;没有 LOL 或 FEC 不可纠正计数 (VDM 与 FEC 指标)。
  2. show … transceiver 把模块显示为受支持(或被容忍),并带有 DDM 数值 (在交换机上验证光模块)。
  3. 流量运行几分钟后计数正常(链路抖动)。
  4. 配置已保存;在拆分或端口模式变更需要重载的平台上,重载后改动依然生效。

在 CodingBox 中

配置速查告诉端口该做什么;模块告诉端口它能做什么。配置速率或拆分之前,先在 Check transceiver 中读取模块的速率代码和 CMIS Applications——端口不能被配置成模块未声明的模式。

Linux 主机方案背后完整的服务器侧工具集——ethtool、mlxlink、bnxtnvm、Windows 和 ESXi 命令、从网卡读取 DDM:网卡工具与诊断。

各配置方案背后的接口命名(Gi1/0/1、et-0/0/48:1、Ethernet0、swp1s0…):端口命名与指示灯;上联配置中的 LAG/MLAG 部分:堆叠与 MLAG。


如果您发现本资料中有不准确之处或错误,请选中相应片段并按 Ctrl+Enter,即可。