As I know, with the command "multipath" BGP can install more than 1 route to a specific destination into the routing table. IE.:  -->  -->

But how is the traffic distributet between these 2 routes? I thought it is session based by default, but when I initiate a ping or iperf I can see traffic on both interfaces.

1 Answer 1


Juniper load balances on a per-traffic-flow basis. You might come across the forwarding policies that say "per-packet" but that's a misnomer.


BGP is simply exchanging the routing information that enables the node to make forwarding decisions (e.g. how to hash across multiple paths).

  • So if a Juniper router identifies a traffic flow, then it will push the traffic only one connection. A second flow however will use the other next-hop. But how does the router differentiate the traffic flows. Based on the combination of source IP+port and destination IP+port?
    – Seathorn
    Aug 10, 2023 at 14:48
  • Generally speaking for IPv4 it's Src/Dst IP and Src/Dst Port, but technically it also depends upon the packet's encapsulation on ingress and egress (i.e. is it IPv4 in and IPv4 out or is it IPv4 in and MPLS out, etc.) There are also configurable items like interface that can be added to the hash algorithm. Aug 11, 2023 at 13:18
  • 1
    Juniper will treat each ping request as a seperate flow (even though a continuous stream of pings from one host to another can be technically grouped into a "flow" by the Identifier field). A default iPerf test is generally only a single flow, but multiple can be initiated in parallel via command-line options. When you see both links being utilised, it may be that the client-server session is going over one link, but the return server-client traffic is being balanced over the other link. Aug 17, 2023 at 12:24

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

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