Help us improve your experience.

Let us know what you think.

Do you have time for a two-minute survey?

Navigation

Supported Platforms

Configuring Symmetrical Load Balancing on an 802.3ad Link Aggregation Group on MX Series Routers

This section describes configuration of symmetrical load balancing on an 802.3ad link aggregation group (LAG) on MX Series routers.

Symmetrical Load Balancing on an 802.3ad LAG on MX Series Routers Overview

MX Series routers with Aggregated Ethernet PICs support symmetrical load balancing on an 802.3ad LAG. This feature is significant when two MX Series routers are connected transparently through deep packet inspection (DPI) devices over an LAG bundle. DPI devices keep track of flows and require information of a given flow in both forward and reverse directions. Without symmetrical load balancing on an 802.3ad LAG, the DPIs could misunderstand the flow, leading to traffic disruptions. By using this feature, a given flow of traffic (duplex) is ensured for the same devices in both directions.

Symmetrical load balancing on an 802.3ad LAG utilizes a mechanism of interchanging the source and destination addresses for a hash computation of fields, such as source address and destination address. The result of a hash computed on these fields is used to choose the link of the LAG. The hash-computation for the forward and reverse flow must be identical. This is achieved by swapping source fields with destination fields for the reverse flow. The swapped operation is referred to as complement hash computation or symmetric-hash complement and the regular (or unswapped) operation as symmetric-hash computation or symmetric-hash. The swappable fields are MAC address, IP address, and port.

Configuring Symmetric Load Balancing on an 802.3ad LAG on MX Series Routers

You can specify whether symmetric hash or complement hash is done for load-balancing traffic. To configure symmetric hash, use the symmetric-hash statement at the [edit forwarding-options hash-key family inet] hierarchy level. To configure symmetric hash complement, use the symmetric-hash complement statement and option at the [edit forwarding-options hash-key family inet] hierarchy level.

These operations can also be performed at the PIC level by specifying a hash key. To configure a hash key at the PIC level, use the symmetric-hash or symmetric-hash complement statement at the [edit chassis hash-key family inet] and [edit chassis hash-key family multiservice] hierarchy levels.

Consider the example in Figure 1.

Figure 1: Symmetric Load Balancing on an 802.3ad LAG on MX Series Routers

 Symmetric Load Balancing on an 802.3ad LAG on MX Series Routers

Router A is configured with symmetric hash and Router B is configured with symmetric hash complement. Thus, for a given flow fx, post hash computation is from Router A to Router B through i2. The reverse traffic for the same flow fx is from Router B to Router A through the same i2 device as its hashing (done after swapping source and destination fields) and returns the same link index; since it is performed on the interchanged source and destination addresses.

However, the link chosen may or may not correspond to what was attached to the DPI. In other words, the hashing result should point to the same links that are connected, so that the traffic flows through the same DPI devices in both directions. To make sure this happens, you need to also configure the counterpart ports (ports that are connected to same DPI-iN) with the identical link index. This is done when configuring a child-link into the LAG bundle. This ensures that the link chosen for a given hash result is always the same on either router.

Note that any two links connected to each other should have the same link index and these link indices must be unique in a given bundle.

The following restrictions apply when configuring symmetric load balancing on an 802.3ad LAG on MX Series routers:

  • The Packet Forwarding Engine (PFE) can be configured to hash the traffic in either symmetric or complement mode. A single PFE complex cannot work simultaneously in both operational modes and such a configuration can yield undesirable results.
  • The per-PFE setting overrides the chassis-wide setting only for the family configured. For the other families, the PFE complex still inherits the chassis-wide setting (when configured) or the default setting.
  • Any change in the hash key configuration requires a reboot of the FPC for the changes to take effect.
  • This feature supports VPLS, INET, and bridged traffic only.
  • This feature cannot work in tandem with the per-flow-hash-seed load-balancing option. It requires that all the PFE complexes configured in complementary fashion share the same seed. A change in the seed between two counterpart PFE complexes may yield undesired results.

For additional information, see the Junos OS VPNs Configuration Guide and the Junos OS System Basics Configuration Guide.

Example Configuration Statements

To configure 802.3ad LAG parameters at the bundle level:

[edit interfaces]
g(x)e-fpc/pic/port {gigether-options {802.3ad {bundle;link-index number;}}}

where the link-index number ranges from 0 through 15.

You can check the link index configured above using the show interfaces command:

[edit forwarding-options hash-key]
family inet {layer-3;layer-4;symmetric-hash {[complement;]}}
family multiservice {source-mac;destination-mac;payload {ip {layer-3 {source-ip-only | destination-ip-only;}layer-4;}}symmetric-hash {[complement;]}}

For load-balancing Layer 2 traffic based on Layer 3 fields, you can configure 802.3ad LAG parameters at a per PIC level. These configuration options are available under the chassis hierarchy as follows:

[edit chassis]
fpc X {pic Y {...hash-key {family inet {layer-3;layer-4;symmetric-hash {[complement;]}}family multiservice {source-mac;destination-mac;payload {ip {layer-3 {source-ip-only | destination-ip-only;}layer-4;}}symmetric-hash {[complement;]}}}...}}

Configuring Symmetrical Load Balancing on Trio-Based MPCs

With some configuration differences, symmetrical load-balancing over an 802.3ad link aggregation group is supported on MX Series routers with Trio-based MPCs.

To achieve symmetrical load-balancing on Trio-Based MPCs, the following needs to be done:

  • Compute a Symmetrical Hash

    Both routers must compute the same hash value from the flow in the forward and reverse directions.On Trio-based platforms, the calculated hash value is independent of the direction of the flow, and hence is always symmetric in nature. For this reason, no specific configuration is needed to compute a symmetric hash value on Trio-based platforms.

    However, it should be noted that the fields used to configure the hash should have identical include and exclude settings on both ends of the LAG.

  • Configure Link Indexes

    To allow both routers to choose the same link using the same hash value, the links within the LAG must be configured with the same link index on both routers. This can be achieved with the link-index statement.

  • Enable Symmetric Load Balancing

    To configure symmetric load balancing on Trio-based MPCs, include the symmetric statement at the [edit forwarding-options enhanced-hash-key] hierarchy level. This statement is applicable to Trio-based platforms only.

    The symmetric statement can be used with any protocol family and enables symmetric load-balancing for all aggregated Ethernet bundles on the router. The statement needs to be enabled at both ends of the LAG. This statement is disabled by default.

  • Achieve Symmetry for Bridged and Routed Traffic

    In some deployments, the LAG bundle on which symmetry is desired is traversed by Layer 2 bridged traffic in the upstream direction and by IPv4 routed traffic in the downstream direction. In such cases, the computed hash is different in each direction because the Ethernet MAC addresses are taken into account for bridged packets. To overcome this, you can exclude source and destination MAC addresses from the enhanced-hash-key computation.

    To exclude source and destination MAC addresses from the enhanced-hash-key computation, include the no-mac-addresses statement at the [edit forwarding-options enhanced-hash-key family multiservice] hierarchy level. This statement is disabled by default.

When symmetrical load balancing is enabled on Trio-based MPCs, keep in mind the following caveats:

  • Traffic polarization is a phenomenon that occurs when using topologies that distribute traffic by using hashing of the same type. When routers are cascaded, traffic polarization can occur, and this can lead to unequal traffic distribution.

    Traffic polarization occurs when LAGs are configured on cascaded routers. For example, in Figure 2, if a certain flow uses Link 1 of the aggregated Ethernet bundle between Device R1 and Device R2, the flow also uses Link 1 of the aggregated Ethernet bundle between Device R2 and Device R3.

    Figure 2: Traffic Polarization on Cascaded Routers When Symmetrical Load Balancing in Enabled on Trio-based MPCs

    Traffic
Polarization on Cascaded Routers When Symmetrical Load Balancing in
Enabled on Trio-based MPCs

    This is unlike having a random link selection algorithm, where a flow might use Link 1 of the aggregated Ethernet bundle between Device R1 and Device R2, and Link 2 of the aggregated Ethernet bundle between Device R2 and Device R3.

  • Symmetric load balancing is not applicable to per-prefix load-balancing where the hash is computed based on the route prefix.
  • Symmetric load balancing is not applicable to MPLS or VPLS traffic, because in these scenarios the labels are not the same in both directions.

Example Configurations

Example Configurations of Chassis Wide Settings

Router A

user@host> show configuration forwarding-options hash-key
family multiservice {payload {ip {layer-3;}}symmetric hash;}

Router B

user@host> show configuration forwarding-options hash-key
family multiservice {payload {ip {layer-3;}}symmetric-hash {complement;}}

Example Configurations of Per–Packet-Forwarding-Engine Settings

Router A

user@host> show configuration chassis fpc 2 pic 2 hash-key
family multiservice {payload {ip {layer-3;}}symmetric hash;}

Router B

user@host> show configuration chassis fpc 2 pic 3 hash-key
family multiservice {payload {ip {layer-3;}}symmetric-hash {complement;}}

Published: 2013-02-26

Supported Platforms

Published: 2013-02-26