• L2 port-channels and L3 ECMP hashing

 
 
Print Friendly, PDF & Email

Each Arista switch platform has a different set of options that can be used to manage the hash algorithm to a port-channel; some are common, but some are unique. The options available are dependent on the ASIC’s capabilities in each hardware model.  For ECMP we take the same algorithm and allow a seed value to be used in order to avoid route polarization to the same paths as L2.   This article will examine the defaults per platform, as well as how to view and modify the current settings on each platform.

Hashing defaults

The default settings for port-channel and ECMP load-balancing (per ASIC) are shown below:

Fields 71xx
(Bali)
7150S
(Alta)
7050
(Trident+)
7050X/7250X/7300X
(Trident2)
7048/7500
(Petra)
7500E
(Arad)
Source-Mac (non-IP)
Source-Mac (IP)
Destination-Mac (non-IP)
Destination-Mac(IP)
Ethernet-Type (non-IP)
Ethernet-Type (IP)
Vlan-ID
Vlan-Priority
IP Source Address
IP Destination Address
IP Protocol Field
TCP/UDP Source Port
TCP/UDP Destination Port

Showing the configuration

The current settings (on all switches) are visible using the command show port-channel load-balance <asic name> fields:

71xx Series – Bali(fm4000) ASIC

Arista7148S#show port-channel load-balance fm4000 fields
Source MAC address hashing for non-IP packets is ON
Destination MAC address hashing for non-IP packets is ON
Ethernet type hashing for non-IP packets is ON
Source MAC address hashing for IP packets is ON
Destination MAC address hashing for IP packets is ON
Ethernet type hashing for IP packets is ON
IP source address hashing is ON
IP destination address hashing is ON
IP protocol field hashing is ON
TCP/UDP source port hashing is ON
TCP/UDP destination port hashing is ON

7150S – Alta(fm6000) ASIC

Arista7150S#show port-channel load-balance fm6000 fields
Source MAC address hashing for non-IP packets is ON
Destination MAC address hashing for non-IP packets is ON
Ethernet type hashing for non-IP packets is ON
VLAN ID hashing for non-IP packets is ON
VLAN priority hashing for non-IP packets is ON
Source MAC address hashing for IP packets is ON
Destination MAC address hashing for IP packets is ON
Ethernet type hashing for IP packets is ON
VLAN ID hashing for IP packets is ON
VLAN priority hashing for IP packets is ON
IP source address hashing is ON
IP destination address hashing is ON
IP protocol field hashing is ON
TCP/UDP source port hashing is ON
TCP/UDP destination port hashing is ON

7050 Series – Trident+ ASIC

 Arista7050S#show port-channel load-balance trident fields
 Source MAC address hashing for non-IP packets is ON
 Destination MAC address hashing for non-IP packets is ON
 Ethernet type hashing for non-IP packets is ON
 Source MAC address hashing for IP packets is OFF
 Destination MAC address hashing for IP packets is OFF
 Ethernet type hashing for IP packets is OFF
 IP source address hashing is ON
 IP destination address hashing is ON
 IP protocol field hashing is ON
 TCP/UDP source port hashing is ON
 TCP/UDP destination port hashing is ON

7050X/7250X/7300X – Trident2 ASIC

Arista7050QX-32#show port-channel load-balance trident fields
Source MAC address hashing for non-IP packets is ON
Destination MAC address hashing for non-IP packets is ON
Ethernet type hashing for non-IP packets is ON
Source MAC address hashing for IP packets is OFF
Destination MAC address hashing for IP packets is OFF
Ethernet type hashing for IP packets is OFF
IP protocol field hashing is ON
IP source address hashing is ON
IP destination address hashing is ON
IP TCP/UDP source port hashing is ON
IP TCP/UDP destination port hashing is ON
IP symmetric hashing is OFF
Source MAC address hashing for IPv6 packets is OFF
Destination MAC address hashing for IPv6 packets is OFF
Ethernet type hashing for IPv6 packets is OFF
IPv6 protocol field hashing is ON
IPv6 source address hashing is ON
IPv6 destination address hashing is ON
IPv6 TCP/UDP source port hashing is ON
IPv6 TCP/UDP destination port hashing is ON
IPv6 symmetric hashing is OFF

7048 / 7500 Series – Petra ASIC

 Arista7500#show port-channel load-balance petraA fields
 Source MAC address hashing for non-IP packets is ON
 Destination MAC address hashing for non-IP packets is ON
 Ethernet type hashing for non-IP packets is ON
 Source MAC address hashing for IP packets is OFF
 Destination MAC address hashing for IP packets is OFF
 Ethernet type hashing for IP packets is OFF
 IP source address hashing is ON
 IP destination address hashing is ON
 IP protocol field hashing is ON
 TCP/UDP source port hashing is ON
 TCP/UDP destination port hashing is ON

7500E Series – Arad ASIC

Arista7500E#show port-channel load-balance arad fields 
Source MAC address hashing for non-IP packets is ON
Destination MAC address hashing for non-IP packets is ON
Ethernet type hashing for non-IP packets is OFF
Source MAC address hashing for IP packets is OFF
Destination MAC address hashing for IP packets is OFF
Ethernet type hashing for non-IP packets is OFF
IP source address hashing is ON
IP destination address hashing is ON
IP protocol field hashing is ON
TCP/UDP source port hashing is ON
TCP/UDP destination port hashing is ON

Modifying the default hashing algorithm

Occasionally, it may be desirable to modify the default settings so as to influence how load balancing is performed by the switch.  The settings are global to the switch, and the configuration options are dependent upon the platform’s ASIC.

71xx Series – Bali ASIC

Arista7148S(config)#port-channel load-balance fm4000 ?
 fields  Configure which fields are inputs to the port channel hash
 <0-2>   Hash Seed for port-channel load balancing
Arista7148S(config)#port-channel load-balance fm4000 fields ? 
  ip   Configure which fields are inputs to the port channel hash for IP packets 
  mac  Configure which MAC fields are inputs to the port channel hash
Arista7148S(config)#port-channel load-balance fm4000 fields ip ?
 ip-tcp-udp-header  Use the layer 3/4 hashes in the port channel hash for IP packets
 mac-header         Use the MAC hash in the port channel hash for IP packets

7150S Series – Alta ASIC

Arista7150S(config)#port-channel load-balance fm6000 ?
fields Configure which fields are inputs to the port channel hash
<0-39> Hash Seed for port-channel load balancing

Arista7150S(config)#port-channel load-balance fm6000 fields ?
ip Configure which fields are inputs to the port channel hash for IP packets
mac Configure which MAC fields are inputs to the port channel hash

Arista7150S(config)#port-channel load-balance fm6000 fields ip ?
ip-tcp-udp-header Use the layer 3/4 hashes in the port channel hash for IP packets

Arista7150S(config)#port-channel load-balance fm6000 fields mac ?
dst-mac Use the destination MAC address in the port channel MAC hash
eth-type Use the Ethernet type in the port channel MAC hash
src-mac Use the source MAC address in the port channel MAC hash
vlan-id Use the VLAN ID in the port channel MAC hash
vlan-priority Use the VLAN priority in the port channel MAC hash

7050 Series – Trident+ ASIC

7050S(config)#port-channel load-balance trident ?
 fields  Configure which fields are inputs to the port channel hash
 <0-47>  Hash Seed for port-channel load balancing
7050S(config)#port-channel load-balance trident fields ?
 ip   Configure which fields are inputs to the port channel hash for IP packets
 mac  Configure which MAC fields are inputs to the port channel hash

7050S(config)#port-channel load-balance trident fields ip ?
 ip-tcp-udp-header  Use the layer 3/4 hashes in the port channel hash for IP packets
 mac-header    Use the MAC hash in the port channel hash for IP packets
7050S(config)#port-channel load-balance trident fields mac ?
 dst-mac   Use the destination MAC address in the port channel MAC hash
 eth-type  Use the Ethernet type in the port channel MAC hash
 src-mac   Use the source MAC address in the port channel MAC hash

7050X/7250X/7300X Series – Trident2 ASIC

Arista7050QX-32(config)#port-channel load-balance trident ?
 fields Configure which fields are inputs to the port channel hash
 <0-47> Hash Seed for port-channel load balancing
Arista7050QX-32(config)#port-channel load-balance trident fields ?
 ip Configure which fields are inputs to the port channel hash for IP packets
 ipv6 Configure which fields are inputs to the port channel hash for IPv6 packets
 mac Configure which MAC fields are inputs to the port channel hash
Arista7050QX-32(config)#port-channel load-balance trident fields ip ?
 destination-ip Use layer 3 IP destination address in the port channel hash for IP packets
 destination-port Use layer 4 TCP/UDP destination port in the port channel hash for IP packets
 ip-tcp-udp-header Use the layer 3/4 hashes in the port channel hash for IP packets
 mac-header Use the MAC hash in the port channel hash for IP packets
 source-ip Use layer 3 IP source address in the port channel hash for IP packets
 source-port Use layer 4 TCP/UDP source port in the port channel hash for IP packets
 symmetric-hash Use normalized addresses and ports in hash for IP packets
Arista7050QX-32(config)#port-channel load-balance trident fields ipv6 ?
 destination-ip Use layer 3 IP destination address in the port channel hash for IP packets
 destination-port Use layer 4 TCP/UDP destination port in the port channel hash for IP packets
 ip-tcp-udp-header Use the layer 3/4 hashes in the port channel hash for IP packets
 mac-header Use the MAC hash in the port channel hash for IP packets
 source-ip Use layer 3 IP source address in the port channel hash for IP packets
 source-port Use layer 4 TCP/UDP source port in the port channel hash for IP packets
 symmetric-hash Use normalized addresses and ports in hash for IP packets
Arista7050QX-32(config)#port-channel load-balance trident fields mac ?
 dst-mac Use the destination MAC address in the port channel MAC hash
 eth-type Use the Ethernet type in the port channel MAC hash
 src-mac Use the source MAC address in the port channel MAC has

7048 Series – Petra ASIC

 Arista7048(config)#port-channel load-balance petraA ?
 fields  Configure which fields are inputs to the port channel hash
 Arista7048(config)#port-channel load-balance petraA fields ?
 ip  Configure whether the MAC, IP, TCP, and UDP fields are inputs to the
 port channel hash for IP packets
 Arista7048(config)#port-channel load-balance petraA fields ip ?
 ip-tcp-udp-header  Use the layer 3 and layer 4 hashes in the port channel hash for IP packets
 mac-header         Use the MAC hash in the port channel hash for IP
 packets

7500E Series – Arad/Petra ASICs

The 7500 series differs from other chassis based switches in that it can handle line cards leveraging both Petra ASICs as well as Arad ASICs.  As such, the hash algorithm can be independently configured for each ASIC type.

Arista7500E(config)#port-channel load-balance ?
 arad Arad switch chip
 petraA PetraA switch chip
Arista7500E(config)#port-channel load-balance arad ?
 fields Configure which fields are inputs to the port channel hash
 <0-65535> Hash Seed for port-channel load balancing
Arista7500E(config)#port-channel load-balance arad fields ?
 ip Configure whether the MAC, IP, TCP, and UDP fields are inputs to the port channel hash for IP packets
Arista7500E(config)#port-channel load-balance arad fields ip ?
 ip-tcp-udp-header Use the layer 3 and layer 4 hashes in the port channel hash for IP packets
 mac-header Use the MAC hash in the port channel hash for IP packets
Arista7500E(config)#port-channel load-balance petraA ?
 fields Configure which fields are inputs to the port channel hash
 <0-65535> Hash Seed for port-channel load balancing
Arista7500E(config)#port-channel load-balance petraA fields ?
 ip Configure whether the MAC, IP, TCP, and UDP fields are inputs to the port channel hash for IP packets
Arista7500E(config)#port-channel load-balance petraA fields ip ?
 ip-tcp-udp-header Use the layer 3 and layer 4 hashes in the port channel hash for IP packets
 mac-header Use the MAC hash in the port channel hash for IP packets

Influencing L2 and L3 hash polarization

While using a hash algorithm to select a next-hop for a flow provides for distribution of flows across equal paths, polarization throughout the network can occur when the same algorithm is used across devices.  Likewise, similar effects can occur when the L2 and L3 algorithms are the same.  To avoid this, two methods can be employed, depending on the capabilities of the hardware.  In the first method, a seed value is added to the hash so that although each device’s hash remains deterministic, but variation between the selected paths will occur from device to device.   By default we use a different seed for the L2 port-channel hash than the L3 hash. The seed is a variation of the same hash (field selection) algorithm. Essentially it takes a random value (seed) and combines it with the hash algorithm to compute link select. This allow a user to vary what links may be selected for L2 load-balancing versus L3 ECMP to avoid route polarization (I.E same hash algo+same seed+port-channel+L3 ECMP=L2+L3 hash to the same link in the same LAG for the same flow).

The second method is simply to employ different hash algorithms.  The algorithms available vary by hardware type, and are represented by a numeric value.   Similarly to the hash fields themselves, the seed to avoid polarization can also be configured on a platform by platform basis if available, or, alternatively, the hash algorithm, or even both can be configured.  To modify the hash outcome on the various hardware platforms, use the following options:

71xx Series – Bali ASIC

Arista7148S(config)#ip load-sharing fm4000 ?
 <0-2>  Seed to use in layer 3 ECMP route selection

7150S Series – Alta ASIC

Arista7150S(config)#ip load-sharing fm6000 ?
 <0-39> Hash function to use in layer 3 ECMP route selection
Arista7150S(config)#port-channel load-balance fm6000 ?
 fields Configure which fields are inputs to the port channel hash
 <0-39> Hash Seed for port-channel load balancing

7050 Series – Trident+ ASIC

 Arista7050S(config)#ip load-sharing trident ?
 <0-5>  Hash function to use in layer 3 ECMP route selection

7050X/7250X/7300X Series – Trident2 ASIC

Arista7050QX-32(config)#port-channel load-balance ?
 trident Trident chip
Arista7050QX-32(config)#port-channel load-balance trident ?
 fields Configure which fields are inputs to the port channel hash
 <0-47> Hash Seed for port-channel load balancing

7048 Series – Petra ASIC

 Arista7048(config)#ip load-sharing petraA ?
 <0-2>  Hashing function to use

7500 Series – Arad/Petra ASICs

Arista7500E(config)#ip load-sharing petraA ?
 <0-2> Hashing function to use in layer 3 ECMP hashing
Arista7500E(config)#port-channel load-balance arad ?
 fields Configure which fields are inputs to the port channel hash
 <0-65535> Hash Seed for port-channel load balancing
Arista7500E(config)#port-channel load-balance petraA ?
 fields Configure which fields are inputs to the port channel hash
 <0-65535> Hash Seed for port-channel load balancing

Follow

Get every new post on this blog delivered to your Inbox.

Join other followers: