风暴控制
总结 阅读本主题,了解在 L2 模式下部署时,云原生路由器如何实现广播速率限制功能。
风暴控制或速率限制功能控制交换矩阵接口上的出口广播、未知单播和组播 (BUM) 流量的速率。
配置示例
通过在部署之前在 values.yaml 文件中调整 stormControlProfiles,可以指定速率限制(以字节/秒为单位)。
# rate limit profiles for bum traffic on fabric interfaces in bytes per second stormControlProfiles: rate_limit_pf1: bandwidth: level: 0
创建配置文件后,可以通过接口属性将其 storm-control-profile
分配给接口。例如:
- eth1: ddp: on interface_mode: trunk vlan-id-list: [100, 200, 300, 700-705] storm-control-profile: rate_limit_pf1 native-vlan-id: 100 no-local-switching: true
系统会将配置的配置文件应用到云原生路由器中的所有指定结构接口。您可以设置的最大每接口速率限制值为每秒 1,000,000 字节。
如果未知的单播、广播或组播流量速率超过指定交换矩阵接口上的设置限制,vRouter 将丢弃流量。您可以通过在 vRouter CLI 中运行 dropstats
命令来查看丢弃计数器值。您可以通过运行 vRouter CLI 命令 vif --get fabric_vif_id --get-drop-stats
查看每个接口的速率限制丢弃计数器。例如:
dropstats L2 untag pkt drop 8832 L2 Src Mac lookup fail 880 Rate limit exceeded 29312474
在交换矩阵接口上配置速率限制配置文件时,当您运行 vif --list
或 或 时,您可以看到配置的限制(以字节/秒为单位) vif --get fabric_vif_id.
vif0/2 PCI: 0000: af: 01.1 (Speed 10000, Duplex 1) Type: Physical HWaddr: 76:5d: f5: f5: c1:7a Vrf:0 Flags: L2Vof QOS:-1 Ref: 8 BUM Rate Limit: 1000000 RX port packets:1 errors:0 RX queue packets:1 errors:0 RX queue errors to lore 000000000000 Driver: net_iavf Fabric Interface: 0000:af:01.1 Status: UP Vlan Mode: Trunk Vlan: 300 500 600 RX packets:0 bytes:0 errors:1 TX packets:0 bytes:0 errors:0 Drops: 1
注意:
-
速率限制只能在物理接口上配置,并且只能在部署期间配置。
-
现有的全局速率限制配置 fabricBMCastRateLimit 从版本 22.4 开始已弃用。