Junos per packet load balancing

If you have two multiple equal cost paths to the same destination, JunOS behavior is to pick up one of the next-hops and use that one. For example in the following scenario, Junos keeps sending the packets via the ge-0/0/0.41 interface.

but you can change this behavior ;

1) Write a policy statement

2) Export this statement

and here how it works;

I won’t lie it didn’t work this way when I tried this traceroute command first time. It worked actually but instead of IP address on the first hop I was seeing address which surprised me. Then I noticed that Junos is using the lowest IP address ( on the configured interface as the source address and to change this behavior I type the following command on the other router ;

#set interfaces ge-0/0/1 unit 40 family inet address primary

This command made this IP address primary because of which the expected output above displayed.

3 thoughts on “Junos per packet load balancing

  1. Sandeep


    I am not really sure if per packet load balancing is being supported on SRX devices.
    It looks like what you have achieved here is “per flow load balancing”.

    Please refer the doc link and supported platforms, as M,T & PTX series.


    Your blog has really good articles, appreciate your hardwork ! 🙂

    Can you please confirm the above query ?



  2. rtoodtoo Post author

    Hi Sandeep,
    I think you are right on that. Because configuration says it is per packet I always do this. I should have done the test with a TCP traffic to show that it is actually flow based. Thanks for pointing it out.

  3. xyz

    does this type of configuration work for dual ISP ? A single SRX have two different ISPs, ISP A and ISP B. Will this configuration load balance the internet traffic destioned for 0.0.0/0 network with single source network say,


You have a feedback?

This site uses Akismet to reduce spam. Learn how your comment data is processed.