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 10.30.40.30 IP address on the first hop I was seeing 10.30.1.1 address which surprised me. Then I noticed that Junos is using the lowest IP address (10.30.1.1) 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 10.30.40.30/24 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

    Hi,

    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.

    http://www.juniper.net/techpubs/en_US/junos12.3/topics/concept/policy-per-packet-load-balancing-overview.html

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

    Can you please confirm the above query ?

    Regards,

    Sandeep.

    Reply
  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.

    Reply
  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, 192.168.1.0/24?

    Reply

You have a feedback?