Switching

last person joined: 2 days ago 

Ask questions and share experiences about EX and QFX portfolios and all switching solutions across your data center, campus, and branch locations.
  • 1.  Per flow load balancing

    Posted 01-13-2010 05:57

    We are running a number of ex4200-24f running 9.5R2.7. Two of the ex4200's are acting as BGP route reflectors the other two peer with them and also with a couple of routers from an external AS this gives us two links out of our network. We can see the same routes across both links and wish to load balance traffic across them. To this end we have set with in BGP the multipath option on the route reflectors.

    The BGP config is contained with in a routing instance along with the routing option statement exporting the load balancing policy into the forwarding table.

    There is a policy statement that contains the routes we wish to load balance and a 'then' statement that contains the load balance command we have added the per packet option. How exactly will this actually load balance.

    I have read that this depends on the type of asic the router contains, obviously we want the load balancing to be per flow so as to ensure that there is no packet reordering.

    There is an example of some config below.

     

    routing-options {

    forwarding-table {

    export load-balance-policy;

     

    policy-options {

    policy-statement load-balance-policy {

    from {

    route-filter x orlonger;

    route-filter x orlonger;

    route-filter x orlonger;

    }

    then {

    load-balance per-packet;

    }

    }

    }



  • 2.  RE: Per flow load balancing
    Best Answer

    Posted 01-13-2010 06:18

    Hi,

     

    per default router would load balance per prefix. So if you have 10 prefixes learned over two equal-cost pathes then traffic destined to 5 out of 10 prefixes would be forwarded over one path and another 5 would go over other path.

     

    Now if you define "per-packet" it will load-balance per flow. L4 information is taken in account in this case. The name "per-packet" is highly misleading but it has historical reasons. No reordering will ever take place!

     

    Kind Regards

    Michael Pergament

     

    If this worked for you please flag my post as an "Accepted Solution" so others can benefit. A kudo would be cool if you think I earned it.



  • 3.  RE: Per flow load balancing

    Posted 06-27-2011 16:47

    Hey All,

     

    I am trying this on Ex4200 VC. I had following configuration on this box.

    suhas.bagul@CTOR1# show | compare
    [edit routing-options]
    +   forwarding-table {
    +       export load-balanncing;
    +   }
    [edit policy-options]
    +   policy-statement load-balanncing {
    +       from {
    +           route-filter 142.225.169.0/27 exact;
    +       }
    +       then {
    +           load-balance per-packet;
    +       }
    +   }

     

    Following was the result:

    suhas.bagul@CTOR1# run show route 142.225.169.0/27 terse

    inet.0: 1882 destinations, 4210 routes (1882 active, 0 holddown, 0 hidden)
    + = Active Route, - = Last Active, * = Both

    A Destination        P Prf   Metric 1   Metric 2  Next hop        AS path
    * 142.225.169.0/27   B 170        100          0 >83.151.111.13   65232 I
                         B 170        100          0 >83.151.111.29   65232 I

    # commit confirmed will be rolled back in 0 minutes
    {master:0}[edit]
    suhas.bagul@CTOR1# run show route forwarding-table matching 142.225.169.0/27   
    Routing table: default.inet
    Internet:
    Destination        Type RtRef Next hop           Type Index NhRef Netif
    142.225.169.0/27   user     0 83.151.111.13      ucst  1553     4 ge-1/0/5.0

    Routing table: __master.anon__.inet
    Internet:

     

     

    It did not load balance on PFE. ???



  • 4.  RE: Per flow load balancing

    Posted 03-05-2012 08:40

    Hi Mike

    you said  the default router would load balance per prefix, but why in the forwarding-option , there are some configuration about ' per-flow, per-prefix', In what condition do we need enable them under forwarding-option?

     

    http://www.juniper.net/techpubs/en_US/junos11.4/topics/usage-guidelines/policy-configuring-per-prefix-load-balancing.html

     

    http://www.juniper.net/techpubs/en_US/junos11.4/topics/usage-guidelines/policy-configuring-per-flow-load-balancing-based-on-hash-values.html

     

     

    Thanks

     

    /Kevin