Support Support Downloads Knowledge Base Juniper Support Portal Community

Knowledge Base

Search our Knowledge Base sites to find answers to your questions.

Ask All Knowledge Base Sites All Knowledge Base Sites JunosE Defect (KA)Knowledge BaseSecurity AdvisoriesTechnical BulletinsTechnotes Sign in to display secure content and recently viewed articles

Hashing algorithm for link aggregation groups (LAGs) on EX Series switches



Article ID: KB22943 KB Last Updated: 14 Feb 2019Version: 5.0

The Institute of Electrical and Electronics Engineers (IEEE) 802.3ad link aggregation protocol enables multiple Ethernet interfaces to be grouped together and form a single link-layer interface, also known as a link aggregation group (LAG) or bundle. This article explains the details of the LAG hashing algorithm on EX Series switches, which determines the member link to be used for an outgoing interface in an aggregated bundle.

Note: This article applies to the following EX models:

  • EX2200-C
  • EX2200
  • EX3200
  • EX3300
  • EX4200
  • EX4500
  • EX4550
  • EX6210
  • EX8200



There are several reasons why aggregated interfaces are used. A link aggregation group (LAG) increases the uplink bandwidth proportional to the number of member interfaces. Another advantage of link aggregation is increased availability, because the LAG is composed of multiple member links. If one member link fails, the LAG continues to carry traffic over the remaining links.

In order to effectively increase the bandwidth of the LAG, traffic needs to be balanced across the member links. The balancing is done by the LAG hashing algorithm, which is designed to have the member links used increasingly equally as the traffic profile gets more diverse. The LAG hashing algorithm on EX Series switches determines the member link to be used for an incoming frame/packet depending on a subset of the following values in the frame/packet header:

  • Source MAC address
  • Destination MAC address
  • Source IP address
  • Destination IP address
  • Source port
  • Destination port
  • IPv6 flow label
  • MPLS label(s)

The hashing algorithm also takes into account the type of the frame/packet in determining the outgoing member link. There are three different types of frames/packets for the EX2200/EX3200/EX4200/EX4500 platforms as far as the algorithm is concerned. For the EX8200 platform, there is the additional MPLS frame type. The different types are as follows:

  • Non-IP frame: A Layer 2 frame with no Layer 3 information
  • IPv4 packet
  • IPv6 packet
  • MPLS frame

Due to the difference in the chipsets they use, the algorithm is implemented differently in the EX2200/EX3200/EX4200/EX4500 and EX8200 platforms. The following tables show the values used in determining the member link to be used per platform, per frame/packet type.

  • For the EX2200/EX3200/EX4200/EX4500 platforms, the following values are taken into account when calculating the hash:

  • For the EX8200 platform, the following values are taken into account when calculating the hash:


A few things to note:

  • The LAG hashing algorithm on EX Series switches is not user configurable.

  • The algorithm is utilization agnostic. In other words, the algorithm will not switch links in the event a link is overutilized due to a given traffic profile.

  • EX8200 Virtual Chassis/XRE200 platforms have a feature known as 'link-local,' where the hashing algorithm favors a member link on the same chassis as the incoming interface of the frame/packet. Other EX Virtual Chassis platforms (i.e., EX4200/EX4500) do not currently have this feature, and the member link is purely determined by the hash calculated using the above values. This feature is in the implementation stage for the EX4200/EX4500 Virtual Chassis platforms at the time of this writing.


Modification History:

2017/09/11 - Added a note in the Summary section with a list of EX models that this article applies to.

Related Links

Comment on this article > Affected Products Browse the Knowledge Base for more articles related to these product categories. Select a category to begin.

Getting Up and Running with Junos

Getting Up and Running with Junos Security Alerts and Vulnerabilities Product Alerts and Software Release Notices Problem Report (PR) Search Tool EOL Notices and Bulletins JTAC User Guide Customer Care User Guide Pathfinder SRX High Availability Configurator SRX VPN Configurator Training Courses and Videos End User Licence Agreement Global Search