enhanced-hash-key (EX)
Syntax (EX Series)
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; } }
Syntax (QFX5000 Series Switches)
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; }
Syntax (QFX10000 Series Switches)
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 } }
Syntax (SRX5000 Series Routers))
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 } }
Syntax (Junos OS Evolved)
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; } }
Syntax Junos OS Evolved (QFX5220 and 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; } } }
Hierarchy Level
[edit forwarding-options]
Junos OS Evolved uses the set
command instead of edit
.
Description
Configure the hashing key used to hash link aggregation group (LAG) and equal-cost multipath (ECMP) traffic, or enable adaptive load balancing (ALB) in a Virtual Chassis Fabric (VCF).
Starting in Junos OS Release 14.1X53-D46, 15.1R7, 16.1R6, 17.1R3, 17.2R2, 17.3R2,
and 17.4R1, the ALB feature is deprecated. If
fabric-load-balance
is enabled in the configuration for a
VCF, delete the configuration item upon upgrading Junos OS.
The hashing algorithm is used to make traffic-forwarding decisions for traffic entering a LAG bundle or for traffic exiting a switch when ECMP is enabled.
For LAG bundles, the hashing algorithm determines how traffic entering a LAG bundle is placed onto the bundle’s member links. The hashing algorithm tries to manage bandwidth by evenly load-balancing all incoming traffic across the member links in the bundle.
When ECMP is enabled, the hashing algorithm determines how incoming traffic is forwarded to the next-hop device.
QFX10000 Series switches-
On QFX10000 Series switches, you can configure the hash seed for load balancing. By default, the QFX10000 Series switches use the system MAC address to generate a hash seed value. You can configure the hash seed value using the hash-seed statement at the [
edit forwarding-options enhanced-hash-key
] hierarchy level. Set a value between 0 and 4294967295. If you do not configure a hash seed value, the system generates a hash seed value based on the system MAC address. -
Starting in Junos OS Release 18.4R1, symmetric hashing is supported on the QFX10000 Series switches. You configure the
no-incoming-port
option under the [edit forwarding-options enhanced-hash-key] hierarchy. By default, Destination IP (DIP), SIP, Layer 4 source and destination ports, and the incoming port are used for hashing. You can only configure symmetric hashing at the global level.
On QFX5000 Series switches, multicast packets gets duplicated or dropped when
vlan-id
is included in the
enhanced-hash-key
configuration. Hence, while configuring
enhanced-hash-key
, you must configure
layer2-payload
and layer2-header
options
without configuring vlan-id
. This behavior is only seen in
multicast traffic.
-
Starting in Junos OS Release 19.4R1, the dynamic load balancing on ECMP is supported on QFX5120-32C and QFX5120-48Y switches. You can configure the
ecmp-dlb
option under the [edit forwarding-options enhanced-hash-key] hierarchy. Refer Dynamic Load Balancing for more details. -
To enable symmetric hashing on the QFX5000 line of switches, configure the
symmetric-hash
option.
Enhanced
hash key is supported on SRX5000 routers by implementing control path for for the
configured setting to reach the services processing card (SPC2) and SPC3. You
configure the session-id
option to enable the control path for the
configured setting to reach the service processing unit
(SPU).
The remaining statements are explained separately. See CLI Explorer.
Required Privilege Level
interface—To view this statement in the configuration.
interface-control—To add this statement to the configuration.
Release Information
Statement introduced in Junos OS Release 13.2X51-D15.
The fabric-load-balance
statement introduced in Junos OS Release
14.1X53-D10.
The fabric-load-balance
statement deprecated starting in Junos OS
Releases 14.1X53-D46, 15.1R7, 16.1R6, 17.1R3, 17.2R2, 17.3R2, and 17.4R1.
The hash-seed
statement introduced in Junos OS Release
15.1X53-D30.
The ecmp-dlb
statement introduced in Junos OS Release 19.4R1 for
QFX5120-32C and QFX5120-48Y switches.
Option symmetric-hash
introduced in Junos OS Release 20.4R1.
Statement introduced in Junos OS Evolved Release 21.3R1.
The ecmp-dlb
statement is introduced in Junos OS Release 23.2R1 for
EX4400-24T, EX4400-24X, and EX-4400-48F switches.