Forum Discussion

Techgeeeg_28888's avatar
Icon for Nimbostratus rankNimbostratus
Jun 28, 2012

iRule to decide the ISP for outgoing traffic on LC

Hi everyone,


I have a small query related to an iRule for Link controller I tried searching for the similar on devcentral but couldn't find one or maybe i missed it so do let me know if the below has been discussed previously.



I have connection from 2 ISP's terminating on Link controller. I want to have an irule that send's the traffic for a particular inside IP via particular link unless that link goes down. Incase of failure the traffic for that IP should be diverted to the second ISP link. Also I have some traffic from a particular inside IP that should be equally loadbalanced/distributed over the two links and in case of failure of one of the ISP's all the traffic should get diverted to the avaliable ISP and should not exceed particular bandwidth limit. Can someone helpme out in this matter.





1 Reply

  • Hi,



    To achieve that, you need :


    - a defaut gateway pool with 2 members (router ISP1 , router ISP2) = pool_out


    - a pool with the same members but with "priority group activation" "less than 1 members" and a priority group value higher for th one you want) = pool_priority1



    - a virtual server (vs_out) with default pool pool_out and an iRule



    when LB_SELECTED {



    switch [IP::remote_addr] {


    "" {


    LB::reselect pool pool_priority1




    default {


    what ever you want









    I don't know for the bandwidth limit.



    Hope this help.