系统转发

nv unset 命令删除您使用等效的 nv set 命令设置的配置。本指南仅在 nv unset 命令与 nv set 命令不同时描述 nv unset 命令。


nv set system forwarding ecmp-hash destination-ip

开启或关闭目标 IP 字段上的 ECMP 哈希。默认设置为 off

自定义哈希允许您指定在第 3 层路由(ECMP 哈希)的多个下一跳之间的负载均衡期间,哈希计算中包含的内容。

版本历史

Cumulus Linux 5.2.0 中引入。

示例

cumulus@switch:~$ nv set system forwarding ecmp-hash destination-ip on

nv set system forwarding ecmp-hash destination-port

开启或关闭目标端口字段上的 ECMP 哈希。默认设置为 off

版本历史

Cumulus Linux 5.2.0 中引入。

示例

cumulus@switch:~$ nv set system forwarding ecmp-hash destination-port on

nv set system forwarding ecmp-hash gtp-teid

开启或关闭 GTP TEID 字段上的 ECMP 哈希。默认设置为 off

只有当从端口传出的外部标头是 GTP 封装的,并且入口数据包是 GTP-U 数据包或 VXLAN 封装的 GTP-U 数据包时,基于 GTP TEID 的 ECMP 哈希才适用。

  • Cumulus Linux 在 NVIDIA Spectrum-2 及更高版本上支持 GTP 哈希。
  • GTP-C 数据包不属于 GTP 哈希的一部分。

版本历史

Cumulus Linux 5.2.0 中引入。

示例

cumulus@switch:~$ nv set system forwarding ecmp-hash gtp-teid on

nv set system forwarding ecmp-hash ingress-interface

开启或关闭入口接口上的 ECMP 哈希。默认设置为 off

版本历史

Cumulus Linux 5.2.0 中引入。

示例

cumulus@switch:~$ nv set system forwarding ecmp-hash ingress-interface on

nv set system forwarding ecmp-hash inner-destination-ip

开启或关闭内部目标 IP 地址字段上的 ECMP 哈希。默认设置为 off

版本历史

Cumulus Linux 5.2.0 中引入。

示例

cumulus@switch:~$ nv set system forwarding ecmp-hash inner-destination-ip on

nv set system forwarding ecmp-hash inner-destination-port

开启或关闭内部目标端口字段上的 ECMP 哈希。默认设置为 off

版本历史

Cumulus Linux 5.2.0 中引入。

示例

cumulus@switch:~$ nv set system forwarding ecmp-hash inner-destination-port on

nv set system forwarding ecmp-hash inner-ip-protocol

开启或关闭内部 IP 协议字段上的 ECMP 哈希。默认设置为 off

版本历史

Cumulus Linux 5.2.0 中引入。

示例

cumulus@switch:~$ nv set system forwarding ecmp-hash inner-ip-protocol on

nv set system forwarding ecmp-hash inner-ipv6-label

开启或关闭内部 IPv6 标签字段上的 ECMP 哈希。默认设置为 off

版本历史

Cumulus Linux 5.2.0 中引入。

示例

cumulus@switch:~$ nv set system forwarding ecmp-hash inner-ipv6-label on

nv set system forwarding ecmp-hash inner-source-ip

开启或关闭内部源 IP 地址字段上的 ECMP 哈希。默认设置为 off

版本历史

Cumulus Linux 5.2.0 中引入。

示例

cumulus@switch:~$ nv set system forwarding ecmp-hash inner-ip-protocol on

nv set system forwarding ecmp-hash inner-source-port

开启或关闭内部源端口字段上的 ECMP 哈希。默认设置为 off

版本历史

Cumulus Linux 5.2.0 中引入。

示例

cumulus@switch:~$ nv set system forwarding ecmp-hash inner-source-port on

nv set system forwarding ecmp-hash ipv6-label

开启或关闭 IPv6 标签字段上的 ECMP 哈希。默认设置为 off

版本历史

Cumulus Linux 5.2.0 中引入。

示例

cumulus@switch:~$ nv set system forwarding ecmp-hash ipv6-label on

nv set system forwarding ecmp-hash ip-protocol

开启或关闭 IP 协议字段上的 ECMP 哈希。对于 IP 流量,交换机在哈希计算中使用 IP 标头源字段和目标字段。默认设置为 off

版本历史

Cumulus Linux 5.2.0 中引入。

示例

cumulus@switch:~$ nv set system forwarding ecmp-hash ip-protocol on

nv set system forwarding ecmp-hash source-ip

开启或关闭源 IP 字段上的 ECMP 哈希。默认设置为 off

版本历史

Cumulus Linux 5.2.0 中引入。

示例

cumulus@switch:~$ nv set system forwarding ecmp-hash source-ip on

nv set system forwarding ecmp-hash source-port

开启或关闭源端口字段上的 ECMP 哈希。默认设置为 off

版本历史

Cumulus Linux 5.2.0 中引入。

示例

cumulus@switch:~$ nv set system forwarding ecmp-hash source-port on

nv set system forwarding ecmp-weight-normalisation max-hw-weight

配置加权 ECMP 的最大硬件条目数。您可以指定介于 8 到 4096 之间的值。默认值为 32。

NVIDIA Spectrum 交换机通过重复每个单独的路径来支持 ECMP 的权重编程,这会消耗资源。为了减少 ECMP 资源的硬件利用率,您可以启用权重归一化。

在 Cumulus Linux 5.9 及更早版本中,您可以指定的加权 ECMP 的最小硬件条目数为 10,最大条目数为 255。

版本历史

Cumulus Linux 5.7.0 中引入。

示例

cumulus@switch:~$ nv set system forwarding ecmp-weight-normalisation max-hw-weight 100

nv set system forwarding ecmp-weight-normalisation mode

启用 (enabled) 和禁用 (disabled) ECMP 权重归一化。

NVIDIA Spectrum 交换机通过重复每个单独的路径来支持 ECMP 的权重编程,这会消耗资源。为了减少 ECMP 资源的硬件利用率,您可以启用权重归一化。

版本历史

Cumulus Linux 5.7.0 中引入。

示例

cumulus@switch:~$ nv set system forwarding ecmp-weight-normalisation mode enabled on

nv set system forwarding hash-seed

为每个交换机配置唯一的哈希种子,以防止哈希极化,这是一种网络拥塞,当多个数据流尝试使用相同的交换机端口到达交换机时发生。

您可以设置介于 0 和 4294967295 之间的哈希种子值。如果您未指定值,则 switchd 会创建一个随机生成的种子。

版本历史

Cumulus Linux 5.2.0 中引入。

示例

cumulus@switch:~$ nv set system forwarding hash-seed 50

nv set system forwarding host-route-preference

配置转发主机路由首选项:routeneighbourroute-and-neighbour

版本历史

Cumulus Linux 5.2.0 中引入。

示例

cumulus@switch:~$ nv set system forwarding host-route-preference neighbour

nv set system forwarding lag-hash

配置自定义哈希以在作为同一 bond 成员的多个接口之间进行负载均衡。

交换机通过 bond 将出口流量分配给从属设备,基于数据包哈希计算,从而在从属设备上提供负载均衡;交换机将对话流分配给所有可用的从属设备,以均衡总流量。单个对话流的流量始终哈希到同一个从属设备。在故障转移事件中,交换机调整哈希计算以引导流量通过可用的从属设备。


nv set system forwarding lag-hash destination-ip

开启或关闭目标 IP 地址字段上的 LAG 哈希。默认设置为 off

版本历史

Cumulus Linux 5.2.0 中引入。

示例

cumulus@switch:~$ nv set system forwarding lag-hash destination-ip on

nv set system forwarding lag-hash destination-mac

开启或关闭目标 MAC 地址字段上的 LAG 哈希。默认设置为 off

版本历史

Cumulus Linux 5.2.0 中引入。

示例

cumulus@switch:~$ nv set system forwarding lag-hash destination-mac on

nv set system forwarding lag-hash destination-port

开启或关闭目标端口字段上的 LAG 哈希。默认设置为 off

版本历史

Cumulus Linux 5.2.0 中引入。

示例

cumulus@switch:~$ nv set system forwarding lag-hash destination-port on

nv set system forwarding lag-hash ether-type

开启或关闭以太网类型字段上的 LAG 哈希。默认设置为 off

版本历史

Cumulus Linux 5.2.0 中引入。

示例

cumulus@switch:~$ nv set system forwarding lag-hash ether-type on

nv set system forwarding lag-hash gtp-teid

开启或关闭 GTP TEID 字段上的 LAG 哈希。GTP 在移动运营商网络的核心内传输移动数据。从蜂窝站点到计算节点的 5G 移动核心集群中的流量具有相同的源 IP 地址和目标 IP 地址。识别单个流的唯一方法是使用 GTP TEID。启用 GTP 哈希将 TEID 添加为哈希参数,并帮助网络中的 Cumulus Linux 交换机在 ECMP 路由上均匀分配移动数据流量。

默认设置为 off

版本历史

Cumulus Linux 5.2.0 中引入。

示例

cumulus@switch:~$ nv set system forwarding lag-hash gtp-teid on

nv set system forwarding lag-hash ip-protocol

开启或关闭 IP 协议字段上的 LAG 哈希。对于 IP 流量,交换机在哈希计算中使用 IP 标头源字段和目标字段。默认设置为 off

版本历史

Cumulus Linux 5.2.0 中引入。

示例

cumulus@switch:~$ nv set system forwarding lag-hash ip-protocol on

nv set system forwarding lag-hash source-ip

开启或关闭源 IP 地址字段上的 LAG 哈希。默认设置为 off

版本历史

Cumulus Linux 5.2.0 中引入。

示例

cumulus@switch:~$ nv set system forwarding lag-hash source-ip on

nv set system forwarding lag-hash source-mac

开启或关闭源 MAC 地址字段上的 LAG 哈希。默认设置为 off

版本历史

Cumulus Linux 5.2.0 中引入。

示例

cumulus@switch:~$ nv set system forwarding lag-hash source-mac on

nv set system forwarding lag-hash source-port

开启或关闭源端口字段上的 LAG 哈希。默认设置为 off

版本历史

Cumulus Linux 5.2.0 中引入。

示例

cumulus@switch:~$ nv set system forwarding lag-hash source-port on

nv set system forwarding lag-hash vlan

开启或关闭 VLAN ID 字段上的 LAG 哈希。默认设置为 off

版本历史

Cumulus Linux 5.2.0 中引入。

示例

cumulus@switch:~$ nv set system forwarding lag-hash vlan on

nv set system forwarding profile

配置转发资源配置文件:defaultl2-heavyl2-heavy-1l2-heavy-3v4-lpm-heavyv4-lpm-heavy-1v6-lpm-heavyv6-lpm-heavy-1ipmc-heavyipmc-maxlpm-balanced

版本历史

Cumulus Linux 5.4.0 中引入。

示例

cumulus@switch:~$ nv set system forwarding profile l2-heavy

nv set system forwarding programming

配置转发编程日志记录。


nv set system forwarding programming log-level

配置转发编程日志级别:debuginfocriticalwarningerror。默认日志级别为 info

版本历史

Cumulus Linux 5.0.0 中引入。

示例

cumulus@switch:~$ nv set system forwarding programming log-level error