Forum Discussion

dlmy_107187's avatar
dlmy_107187
Icon for Nimbostratus rankNimbostratus
Jul 08, 2010

How to use irule to control 1 IP subnet by only utilizing 1 ISP link.

Need help on Irules:

 

 

 

my setup:

 

_______ Switch

 

isp 1------| | |--------- 192.168.1.0/24

 

isp 2------| F5 LC |---------------Firewall---------|-------- 192.168.2.0/24

 

isp 3------|_______| |---------192.168.3.0/24

 

 

 

I need to control segment 192.168.3.0/24 Users to use only link isp3 for internet browsing.

 

and incase of isp3 link is down, then isp link 2 will take over.

 

 

Can anyone help me e an to write an irule to achieve this?

 

 

 

Thanks

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

1 Reply

  • I assume you already have one pool on the LC that contains all 3 routers for ISP3. I'd create another one with a name like "pool_isp3" and add its router as well as "pool_isp2" which contains its router.

    Then, on your IP_Forwarding VS to which you have the default pool that contains all 3 routers, configure and attach an iRule like this:

    when CLIENT_ACCEPTED {
    if { [IP::addr [IP::client_addr]] eq 192.168.3.0/24 } {
        if { [active_members pool_isp3] > 0}  {
             pool pool_isp3 }
         else { 
             pool pool_isp2 }
         }
    }
    

    Something like this should work...what's your plan if both ISP2 and ISP3 are down? You might have to add another else in there. I'll let others chime in on how to optimize this rule üòõ