load-balance hash

For supported header types, selects the fields used for LAG and Layer 3 ECMP hashing.

Syntax

load-balance hash [ ethernet | ip | ipv6 | l4 | mpls ]
load-balance hash ethernet { da-mac | etype | sa-mac | smac-dmac | vlan }
load-balance hash ip { dst-ip | dst-l4-port | protocol | sip-dip | src-ip | src-l4-port }
load-balance hash ipv6 { ipv6-dst-ip | ipv6-dst-l4-port | ipv6-next-hdr | ipv6-src-ip | ipv6-src-l4-port | sipv6-dipv6 }
load-balance hash l4 src-dst-port
load-balance hash mpls { label1 | label2 | label3 | all-labels }
no load-balance hash [ ethernet | ip | ipv6 | l4 | mpls ]
no load-balance hash ethernet { da-mac | etype | sa-mac | smac-dmac | vlan }
no load-balance hash ip { dst-ip | dst-l4-port | protocol | sip-dip | src-ip | src-l4-port }
no load-balance hash ipv6 { ipv6-dst-ip | ipv6-dst-l4-port | ipv6-next-hdr | ipv6-src-ip | ipv6-src-l4-port | sipv6-dipv6 }
no load-balance hash l4 src-dst-port
no load-balance hash mpls { label1 | label2 | label3 | all-labels }

Command Default

All header parameters are enabled.

Parameters

ethernet
da-mac
Use Layer 2 destination address for hashing.
etype
Use etype option for hashing.
sa-mac
Use Layer 2 source address for hashing.
vlan
Use the vlan option for hashing.
smac-dmac
Use the source and destination MACs of the inner and outer headers for hashing.
ip
dst-ip
Use the destination IP address for hashing.
dst-l4-port
Use the destination Layer 4 port for hashing.
protocol
Use the IP protocol value for hashing.
sip-dip
Use the IPv4 Source IP and IPv4 Destination IP addresses of the inner and outer headers for hashing.
src-ip
Use the source IP address for hashing.
src-l4-port
Use the source Layer 4 port for hashing.
ipv6
ipv6-dst-ip
Use the destination IPv6 address for hashing.
ipv6-dst-l4-port
Use the IPv6 destination Layer 4 port for hashing.
ipv6-next-hdr
Use the next IPv6 header for hashing.
ipv6-src-ip
Use the source IPv6 address for hashing.
ipv6-src-l4-port
Use the IPv6 source Layer 4 port for hashing.
sipv6-dipv6
Use the IPv6 Source IP and IPv6 Destination IP addresses for hashing.
l4 src-dst-port
Use both the source and the destination ports in L4 header for calculating hash.
mpls
Not supported on SLX 9150 or SLX 9250 platforms
label1
Use only the MPLS label 1 for hashing.
label2
Use only the MPLS label 2 for hashing.
label3
Use only the MPLS label 3 for hashing.
all-labels
Use all the MPLS labels for hashing.

Modes

Global configuration mode

Usage Guidelines

The no forms of these commands cancel selection of the relevant protocol headers for LAG hashing.

Table 1. Support Matrix
Command Supported In Not Supported In
  • load-balance hash ethernet etype
  • load-balance hash ethernet vlan
  • All platforms
None
  • load-balance hash ethernet da-mac
  • load-balance hash ethernet sa-mac
  • Extreme 8720
  • Extreme 8520
  • SLX 9640
  • SLX 9540
  • SLX 9250
  • SLX 9150
  • Extreme 8820
  • SLX 9740
  • load-balance hash ethernet smac-dmac
  • Extreme 8820
  • SLX 9740
All other platforms
  • load-balance hash ip protocol
  • All platforms
None
  • load-balance hash ip dst-ip
  • load-balance hash ip dst-l4-port
  • load-balance hash ip src-ip
  • load-balance hash ip src-l4-port
  • Extreme 8720
  • Extreme 8520
  • SLX 9640
  • SLX 9540
  • SLX 9250
  • SLX 9150
  • Extreme 8820
  • SLX 9740
  • load-balance hash ip sip-dip
  • Extreme 8820
  • SLX 9740
All other platforms
  • load-balance hash ipv6 ipv6-next-hdr
  • All platforms
None
  • load-balance hash ipv6 ipv6-dst-ip
  • load-balance hash ipv6 ipv6-dst-l4-port
  • load-balance hash ipv6 ipv6-src-ip
  • load-balance hash ipv6 ipv6-src-l4-port
  • Extreme 8720
  • Extreme 8520
  • SLX 9640
  • SLX 9540
  • SLX 9250
  • SLX 9150
  • Extreme 8820
  • SLX 9740
  • load-balance hash ipv6 sipv6-dipv6
  • Extreme 8820
  • SLX 9740
All other platforms
  • load-balance hash l4 src-dst-port
  • Extreme 8820
  • SLX 9740
All other platforms
  • load-balance hash mpls label1
  • load-balance hash mpls label2
  • load-balance hash mpls label3
  • SLX 9540
  • SLX 9640
All other platforms
  • load-balance hash mpls all-labels
  • Extreme 8820
  • SLX 9740
All other platforms

Examples

The following example specifies Layer 2 destination address.

device# configure terminal
device(config)# load-balance hash ethernet da-mac

The following example cancels the default enablement of IPv4 headers for hashing. It then enables IPv4 source IP address only.

device# configure terminal
device(config)# no load-balance hash ip
device(config)# load-balance hash ip src-ip