By default, when there are multiple equal-cost paths to the same destination for the active route, the JUNOS software uses a hash algorithm to select one of the next-hop addresses to install in the forwarding table. Whenever the set of next hops for a destination changes, the next-hop address is reselected using the hash algorithm.
You can configure the JUNOS software so that, for the active route, all next-hop addresses for a destination are installed in the forwarding table. This feature is called per-packet load balancing. You can use load balancing to spread traffic across multiple paths between routers. You can also configure per-packet load balancing to optimize VPLS traffic flows across multiple paths.
To optimize VPLS traffic flows across multiple paths, you need to load-balance traffic based on Layer 2 media access control (MAC) information by including the family multiservice statement at the [edit forwarding-options hash-key] hierarchy level:
-
family multiservice {
- destination-mac;
- source-mac;
- }
The family multiservice statement includes the following configuration options:
You can include the source MAC address in the hash key, the destination MAC address, or both.
![]() |
Note: This feature is not supported on J-series Services Routers. |
For more information about how to configure per-packet load balancing, see the JUNOS Policy Framework Configuration Guide.