enhanced-hash-key
语法(EX 系列)
enhanced-hash-key { ecmp-dlb { assigned-flow; per-packet; flowlet inactivity-interval; ether-type (ipv4|ipv6|mpls); } ecmp-resilient-hash; fabric-load-balance { flowlet { inactivity-interval interval; } per-packet; } hash-mode { layer2-header; layer2-payload; } family inet { no-ipv4-destination-address; no-ipv4-source-address; no-l4-destination-port; no-l4-source-port; no-protocol; vlan-id; } family inet6 { no-ipv6-destination-address; no-ipv6-source-address; no-l4-destination-port; no-l4-source-port; no-next-header; vlan-id; } layer2 { no-destination-mac-address; no-ether-type; no-source-mac-address; vlan-id; } }
语法(QFX5000 系列交换机)
enhanced-hash-key { conditional-match name { offset1 { base-offset1 (start-of-L2Header | start-of-L3-InnerHeader | start-of-L3-OuterHeader | start-of-L4-Header); matchdata1 matchdata1; matchdata1-mask matchdata1-mask; offset1-value offset1-value; } offset2 { base-offset2 (start-of-L2Header | start-of-L3-InnerHeader | start-of-L3-OuterHeader | start-of-L4-Header); matchdata2 matchdata2; matchdata2-mask matchdata2-mask; offset2-value offset2-value; } offset3 { base-offset3 (start-of-L2Header | start-of-L3-InnerHeader | start-of-L3-OuterHeader | start-of-L4-Header); matchdata3 matchdata3; matchdata3-mask matchdata3-mask; offset3-value offset3-value; } offset4 { base-offset4 (start-of-L2Header | start-of-L3-InnerHeader | start-of-L3-OuterHeader | start-of-L4-Header); matchdata4 matchdata4; matchdata4-mask matchdata4-mask; offset4-value offset4-value; } } ecmp-dlb { assigned-flow; per-packet; flowlet inactivity-interval; ether-type (ipv4|ipv6|mpls); } ecmp-resilient-hash; fabric-load-balance { flowlet { inactivity-interval interval; } per-packet; } flex-hashing name { ethtype { inet { conditional-match conditional-match; hash-offset { offset1 { base-offset1 (start-of-L2Header | start-of-L3-InnerHeader | start-of-L3-OuterHeader | start-of-L4-Header); offset1-mask offset1-mask; offset1-value offset1-value; offset2 { base-offset2 (start-of-L2Header | start-of-L3-InnerHeader | start-of-L3-OuterHeader | start-of-L4-Header); offset2-mask offset2-mask; offset2-value offset2-value; } } } interface interface; } inet6 { conditional-match conditional-match; hash-offset { offset1 { base-offset1 (start-of-L2Header | start-of-L3-InnerHeader | start-of-L3-OuterHeader | start-of-L4-Header); offset1-mask offset1-mask; offset1-value offset1-value; offset2 { base-offset2 (start-of-L2Header | start-of-L3-InnerHeader | start-of-L3-OuterHeader | start-of-L4-Header); offset2-mask offset2-mask; offset2-value offset2-value; } } } interface interface; } mpls { conditional-match conditional-match; hash-offset { offset1 { base-offset1 (start-of-L2Header | start-of-L3-InnerHeader | start-of-L3-OuterHeader | start-of-L4-Header); offset1-mask offset1-mask; offset1-value offset1-value; offset2 { base-offset2 (start-of-L2Header | start-of-L3-InnerHeader | start-of-L3-OuterHeader | start-of-L4-Header); offset2-mask offset2-mask; offset2-value offset2-value; } } } interface interface; num-labels num-labels; } } } hash-mode { layer2-header; layer2-payload; gtp-header-offset offset-value; } hash-parameters { ecmp { function { (crc16-bisync | crc16-ccitt | crc32-hi | crc32-lo); } offset offset; preprocess; } lag { function { (crc16-bisync | crc16-ccitt | crc32-hi | crc32-lo); } offset offset; preprocess; } } family inet { gtp-tunnel-endpoint-identifier; no-incoming-port; no-ipv4-destination-address; no-ipv4-source-address; no-l4-destination-port; no-l4-source-port; no-protocol; vlan-id; } family inet6 { no-incoming-port; no-ipv6-destination-address; no-ipv6-source-address; no-l4-destination-port; no-l4-source-port; no-next-header; vlan-id; } layer2 { no-destination-mac-address; no-ether-type; no-source-mac-address; vlan-id; } symmetric-hash { inet; inet6; } } vxlan { no-inner-payload; }
语法(QFX10000 系列交换机)
enhanced-hash-key { hash-seed seed-value; family inet { gtp-tunnel-endpoint-identifier; no-ipv4-destination-address; no-ipv4-source-address; no-l4-destination-port; no-l4-source-port; no-incoming-port; } family inet6 { gtp-tunnel-endpoint-identifier; ipv6-flow-label; no-ipv6-destination-address; no-ipv6-source-address; no-l4-destination-port; no-l4-source-port; no-incoming-port; } layer2 { destination-mac-address inner-vlan-id; no-ether-type; no-vlan-id; source-mac-address; } no-mpls; gre { key; protocol; } vxlan-vnid } }
语法(SRX5000 系列路由器))
enhanced-hash-key { family inet { gtp-tunnel-endpoint-identifier; incoming-interface-index; l2tp-tunnel-session-identifier; session-id; type-of-service; } family inet6 { gtp-tunnel-endpoint-identifier; incoming-interface-index; no-flow-label; session-id; traffic-class; } layer2 { destination-mac-address inner-vlan-id; no-ether-type; no-vlan-id; source-mac-address; } no-mpls; gre { key; protocol; } vxlan-vnid } }
语法(Junos OS 演化版)
enhanced-hash-key { family any { incoming-interface-index; no-tunnel-payload; } family inet { gtp-tunnel-endpoint-identifier; no-destination-port; no-source-port; type-of-service; } family inet6 { gtp-tunnel-endpoint-identifier; no-destination-port; no-flow-label; no-source-port; traffic-class; } family mpls { label-1-exp; no-labels; no-payload; } family multiservice { no-payload; } hash-seed; } resilient-hash-seed; } }
语法 Junos OS 演化版(QFX5220 和 QFX5130)
enhanced-hash-key { ecmp-resilient-hash; family inet { no-incoming-device; no-incoming-port; no-ipv6-destination-address; no-ipv6-source-address; no-l4-destination-port; no-l4-source-port; no-protocol; vlan-id; } family inet6 { no-incoming-device; no-incoming-port; no-ipv6-destination-address; no-ipv6-source-address; no-l4-destination-port; no-l4-source-port; no-nxt-hdr; vlan-id; } hash-mode { layer2-header; layer2-payload; } layer2 { no-destination-mac-address; no-ether-type; no-incoming-device; no-incoming-device; no-smac-address; vlan-id; } hash-parameters { ecmp { function { (crc16-bisync | crc16-ccitt | crc32-hi | crc32-lo); } offset offset; preprocess; } lag { function { (crc16-bisync | crc16-ccitt | crc32-hi | crc32-lo); } offset offset; preprocess; } } }
层次结构级别
[edit forwarding-options]
Junos OS 演化版使用命令而不是 set
edit
.
描述
配置用于对链路聚合组 (LAG) 和等价多路径 (ECMP) 流量进行哈希处理的哈希密钥,或在虚拟机箱交换矩阵 (VCF) 中启用自适应负载平衡 (ALB)。
从 Junos OS 版本 14.1X53-D46、15.1R7、16.1R6、17.1R3、17.2R2、17.3R2 和 17.4R1 开始,ALB 功能已弃用。如果在 VCF 的配置中启用了,请在 fabric-load-balance
升级 Junos OS 时删除配置项。
散列算法用于在启用 ECMP 时,对进入 LAG 束的流量或退出交换机的流量做出流量转发决策。
对于 LAG 捆绑包,散列算法确定如何将进入 LAG 捆绑包的流量放置在捆绑包的成员链路上。散列算法尝试通过均衡捆绑包中成员链路上所有传入流量的负载来管理带宽。
启用 ECMP 后,散列算法将确定如何将传入流量转发到下一跃点设备。
QFX10000 系列交换机-
在 QFX10000 系列交换机上,您可以配置哈希种子以实现负载平衡。默认情况下,QFX10000 系列交换机使用系统 MAC 地址生成散列种子值。您可以在 [
edit forwarding-options enhanced-hash-key
] 层次结构级别使用该语句配置hash-seed哈希种子值。设置一个介于 0 和 4294967295 之间的值。如果未配置哈希种子值,系统将根据系统 MAC 地址生成哈希种子值。 -
从 Junos OS 18.4R1 版开始,QFX10000 系列交换机支持对称散列。您可以在 [编辑转发选项增强哈希键] 层次结构下配置该
no-incoming-port
选项。默认情况下,目标 IP (DIP)、SIP、第 4 层源端口和目标端口以及传入端口用于散列。只能在全局级别配置对称哈希。
在 QFX5000 系列交换机上,当配置中包含enhanced-hash-key
组播数据包时vlan-id
,组播数据包将被复制或丢弃。因此,在配置 时,您必须在不配置 enhanced-hash-key
vlan-id
的情况下配置 layer2-payload
和 layer2-header
选项。此行为仅在组播流量中可见。
-
从 Junos OS 19.4R1 版开始,QFX5120-32C 和 QFX5120-48Y 交换机支持 ECMP 上的动态负载平衡。您可以在 [编辑转发选项增强哈希键] 层次结构下配置该
ecmp-dlb
选项。有关更多详细信息 ,请参阅动态负载平衡 。 -
要在交换机QFX5000线上启用对称散列,请配置该
symmetric-hash
选项。
通过为配置的设置实施控制路径以到达服务处理卡 (SPC2) 和 SPC3,SRX5000路由器上支持增强型哈希密钥。您可以配置该 session-id
选项以启用已配置设置的控制路径以到达服务处理单元 (SPU)。
其余语句将单独解释。请参阅 CLI 资源管理器。
所需权限级别
接口 — 在配置中查看此语句。
接口控制 — 将此语句添加到配置中。
发布信息
在 Junos OS 13.2X51-D15 版中引入的语句。
Junos OS 14.1X53-D10 版中引入的 fabric-load-balance
语句。
从 fabric-load-balance
Junos OS 版本 14.1X53-D46、15.1R7、16.1R6、17.1R3、17.2R2、17.3R2 和 17.4R1 开始,该语句已弃用。
Junos OS 15.1X53-D30 版中引入的 hash-seed
语句。
Junos OS 19.4R1 版中为 QFX5120-32C 和 QFX5120-48Y 交换机引入的 ecmp-dlb
声明。
Junos OS 20.4R1 版中引入的选项 symmetric-hash
。
Junos OS 演化版 21.3R1 中引入的语句。
该 ecmp-dlb
语句在适用于 EX4400-24T、EX4400-24X 和 EX-4400-48F 交换机的 Junos OS 23.2R1 版中引入。