hash-mode
Syntax hash-mode {
layer2-header;
layer2-payload;
}
Hierarchy Level [edit forwarding-options enhanced-hash-key]
Release Information Statement introduced in Junos OS Release 13.2X51-D15 for EX Series switches.
Statement introduced in Junos OS Release 13.2X51-D20 for QFX Series devices.
Description Select the mode for the hashing algorithm.
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.
The hash mode that is set using this statement determines which fields are inspected
by the hashing algorithm. You must set the hash mode to layer2-payload if you want the
hashing algorithm to inspect fields in the Layer 2 payload when making hashing decisions.
You must set the hash mode to layer2-header if you want the hashing algorithm to inspect
fields in the Layer 2 header when making hashing decisions.
If the hash mode is set to layer2-payload, you can set the fields used by the hashing
algorithm to hash IPv4 traffic using the set forwarding-options enhanced-hash-key inet
statement. You can set the fields used by the hashing algorithm to hash IPv6 traffic using
the set forwarding-options enhanced-hash-key inet6 statement.
If the hash mode is set to layer2-header, you can set the fields that the hashing algorithm
inspects in the Layer 2 header using the set forwarding-options enhanced-hash-key layer2
statement.
Default layer2-payload
Options layer-2-payload—Set the hashing algorithm to use fields in the Layer 2 payload to make
hashing decisions.
layer-2-header—Set the hashing algorithm to use fields in the Layer 2 header to make
hashing decisions.
Required Privilege
Level
interface—To view this statement in the configuration.
interface-control—To add this statement to the configuration.
183Copyright © 2015, Juniper Networks, Inc.
Chapter 3: Configuration Statements