I have a single Juniper router which is connected to multiple external ASs. I am looking to load balancing for best way to automatically move traffic away from one link the others (without hardcoded static routes) and have a few questions about the statements from this source:

The forwarding table balances the traffic headed to a destination, transmitting packets in round-robin fashion among the multiple next hops (up to a maximum of eight equal-cost load-balanced paths). The traffic is load-balanced on a per-packet basis. Per-packet load distribution uses a hashing algorithm that distributes packets over equal-cost links. The algorithm is designed to distribute packets to prevent any single link from being saturated. However, per-packet load balancing offers no guarantee of equal distribution of traffic over equal-cost links, nor does it guarantee that increasing the number of Internet flows creates a better hash distribution. ...packets in which all of these parameters are identical, and it ensures that these packets are sent out through the same interface. This prevents problems that might otherwise occur with packets arriving at their destination out of their original sequence.

Can someone answer the following questions:

  1. Does the Junos per-packet load balancing hashing algorithm detect if a link is being saturated and will forward the packets that have an equal cost route over the other link, or does it remain random/round-robin.
  2. Is it possible to configure the router to artificially inflate the 'cost' of a path by x number of hops when the link reaches certain saturation levels/thresholds.

2 Answers 2


1) No, the router decides on packet characteristics not on link saturation. Which characteristics are used depends on the router type. Typically it would be Src/Dst IPs, Src/Dst Ports.

2) The only thing I can think of would be to script something like that with JunoScript but even that would not solve your problem as ALL the traffic would be forced over the second link and saturate that also.

As the document states there is no guarantee of equal distribution. It depends on your router type and the type of traffic flows you have.


If you will change too frequently your bgp config (prepend and announcements) probably you will be dampened on your upstream providers, thus it is not possible to automatic loadbalance trafiic with bgp (Automatic state changes)

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.