Forum Discussion

Gregg_Freeman's avatar
Gregg_Freeman
Icon for Nimbostratus rankNimbostratus
Jul 14, 2020

iRule redirect based on IP subnet

Can anyone confirm if this iRule will work I am newbie to anything Big-IP. I am pulling what I can find here.

 

1 when CLIENT_ACCEPTED {

2   if { [IP::addr [IP::client_addr] equals 10.205.0.0/16] } {

3     pool MCGTWebSSL

4  } else {pool Default_Pool}

5 }

6 Replies

  • Sajid's avatar
    Sajid
    Icon for Cirrostratus rankCirrostratus

    My recommendation to use Local Traffic Policies

     

    https://techdocs.f5.com/kb/en-us/products/big-ip_ltm/manuals/product/local-traffic-policies-getting-started-12-1-0/1.html

     

    • Gregg_Freeman's avatar
      Gregg_Freeman
      Icon for Nimbostratus rankNimbostratus

      Please provide insight as to why using local traffic policies is a better solution that iRules? I have 150 subnets I need to create rules for.

  • I need to add additional subnets to my iRule. Do I just copy and paste multiple instances of the rule I posted earlier. So just a repeat of lines 1-5 for each subnet or is there a better way? All subnets will be sent to the same pool and default_Pool.