enhanced-hash-key

 

Syntax

Hierarchy Level

Release Information

Statement introduced in Junos OS Release 10.1.

services-loadbalancing statement introduced in Junos OS Release 11.2.

gtp-tunnel-endpoint-identifier statement introduced in Junos OS Release 13.2

ether-pseudowire statement introduced in Junos OS Release 16.1 for the M Series, MX Series, and PTX Series.

l2tp-tunnel-session-identifier statement introduced in Junos OS Release 17.2

Starting in Junos OS Release 18.3R1, the default behavior for IPv6, GRE, and PPPoE packet hash computation is to include the flow-label field for improved load-balancing in certain cases. Use the no-payload option to revert to the previous method for hash computation.

Description

Computed hash is used in selecting an ECMP path and load balancing. Starting in Junos OS Release 18.3R1, the flow-label field is included by default in the hash computation for IPv6, GRE, and PPPoE packets. This can be beneficial, for example, when you have MX routers operating as designated router (DR) or rendezvous point (RP) and want to load balance traffic on the basis of a single Layer 3 or Layer 4 flow. You can revert to the previous method of hash computation by setting the no-flow-label option.

  • For GRE packets, if the outer IP packet is non-option packet and the inner packet is IPv4 or IPv6, then the source and destination IP addresses from inner packet will be included in hash computation.

    The Layer 4 ports will also be included in hash computation if the protocol of the inner IP packet is TCP or UDP, and if the inner IP packet is not an options packet.

    If outer IP packet is a non-options packet, and the inner packet is MPLS, then the top inner label is included in hash computation.

  • For PPPoE packet, if the inner packet is IPv4 or IPv6, then source and destination IP addresses from inner packet will be included in hash computation.

    The Layer 4 ports are included in the hash computation if the protocol of inner IP packet is TCP or UDP, and the inner IP packet is a non-options packet.

For MX Series routers with MPCs, T4000 routers with Type 5 FPCs, and EX9200 switches, select data used in the hash key for enhanced IP forwarding engines.

By default, MPCs use the following parameters for hashing:

  • Source IP address

  • Destination IP address

  • Layer 3 protocol

  • Source port

  • Destination port

  • Generic routing encapsulation (GRE) for GRE packets only.

You can modify the default hashing mechanism on MPCs and Type 5 FPCs by configuring statements at the [edit forwarding-options enhanced-hash-key] hierarchy level.

Default

Not enabled.

Options

services-loadbalancing—Distributes traffic across PICs based on source IP address when a route pointing to more than one services PICs is installed.

symmetric—Enable symmetric load balancing across aggregated Ethernet interfaces. This option is needed on Trio-based MPCs only.

Data selections for services-loadbalancing:

  • inet—IPv4 addressing protocol.

  • inet6—IPv6 addressing protocol.

  • layer-3-services—Include layer 3 IP data in the hash key.

  • incoming-interface-index—Include incoming interface index in the hash key.

  • source-address—Include source-address in the hash key.

  • destination-address—Include destination-address in the hash key.

  • src-prefix-len—Include the source prefix length in the hash key.

Data selections for family inet:

  • gtp-tunnel-endpoint-identifer—Include the tunnel endpoint identifier (TEID) field in the hash key for GPRS tunneling protocol (GTP) traffic.

    Note

    This option is supported only on MX Series routers with MPCs and on the MX80 router.

  • incoming-interface-index—Include incoming interface index in the hash key.

  • no-destination-port—Omit IP destination port in the hash key.

  • no-source-port—Omit IP source port in the hash key.

  • type-of-service—Include type-of-service (TOS) byte in the hash key.

Data selections for family inet6:

  • gtp-tunnel-endpoint-identifer—Include the tunnel endpoint identifier (TEID) field in the hash key for GPRS tunneling protocol (GTP) traffic.

    Note

    This option is supported only on MX Series routers with MPCs and on the MX80 router.

  • incoming-interface-index—Include the incoming interface index in the hash key.

  • no-destination-port—Omit the IP destination port in the hash key.

  • no-flow-label—Omit the flow-label in the hash key calculation.

  • no-source-port—Omit the IP source port in the hash key.

  • traffic-class—Include the traffic class byte in the hash key.

Data selections for family mpls:

  • ether-pseudowire—Load-balance IP over Ethernet pseudowire. Presence of zero-control-word in the payload indicates an Ethernet frame.

  • incoming-interface-index—Include the incoming interface index in the hash key.

  • label-1-exp—The EXP bit of the first label is used in the hash calculation.

  • no-ether-pseudowire—Omit the Ethernet pseudowire payload data from the hash key (MX Series routers with MPCs only).

  • no-payload—Omit the MPLS payload data from the hash key.

Data selections for family multiservice:

  • incoming-interface-index—Include the incoming interface index in the hash key.

  • no-mac-address—Omit source and destination MAC addresses from the hash key.

  • no-payload—Omit payload data from the hash key calculation.

  • outer-priority—Include the outer 802.1 priority bits in the hash key.

Required Privilege Level

interface—To view this statement in the configuration.

interface-control—To add this statement to the configuration.