0

I'm trying to change the nexthop for a virtual server in F5. I have read this article. I have tried using the this irule

{
  nexthop internal 10.10.0.2
}

by itself and it doesn't work. I also have tried changing the internal_IP to 0.0.0.0/0 and it still does not work.

   when CLIENT_ACCEPTED {
      if { [class match [IP::client_addr] equals internal_IP] } {
        nexthop internal 10.10.0.1
      }
    }

My goal is just to change the nexthop for virtual server 'Test' no matter what the conditions are.

1
  • Did any answer help you? If so, you should accept the answer so that the question doesn't keep popping up forever, looking for an answer. Alternatively, you can post and accept your own answer.
    – Ron Maupin
    Dec 17 '20 at 20:48
1

I haven't tested this, but I assume your attempts don't work because you don't have any match clause to tell the F5 when to apply this rule. So it should be something like this:

when CLIENT_ACCEPTED {
    nexthop internal 10.10.0.1
}
0

If this is a simple forwarder, I would check out using BIG-IP Local Traffic Policies instead of iRules. iRules are more flexible but if it's not complicated, the local traffic policies are compiled rules and don't have to trigger the TCL handler, meaning as traffic increases they can be much more performant.

These policies can replace a majority of basic redirection iRules

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.