Learn F5 Technologies, Get Answers & Share Community Solutions Join DevCentral

Filter by:
  • Solution
  • Technology
Answers

iRule for reset TCP connection if pool down

Hello, I have a kind of health monitor for my DNS (tcp half open) which check every 30sec the VS on my F5 LTM.

I would like the LTM reset connection when the VS is down. I tried this irule, my flow is deny by BIG IP even if I have my VS up.


when FLOW_INIT {
   if { [active_members [LB::server pool]] == 0 } {
      reject
   }

Thanks for your help!

0
Rate this Question
Comments on this Question
Comment made 2 months ago by Jason Reed

The irule doesn't work because you can not use a LB: (loadbalance) when FLOW_INIT - there hasn't been a LB decision yet.

use something like: when FLOW_INIT { if { [active_members http-pool] == 0 } { reset } }

0

Answers to this Question

placeholder+image
USER ACCEPTED ANSWER & F5 ACCEPTED ANSWER

You don't need to run an iRule when all pool members down. Set the "Action On Service Down feature" within the virtual server to "reject": https://support.f5.com/csp/article/K15095.

0
Comments on this Answer
Comment made 27-Aug-2018 by nertolf28200 2

Thanks Tyler! .

One more question: I have several F5 (different version 11.5.5 and 13.1) On 13.1 version I can select "Immediate Action On Service Down" directly from my VS so when the VS is down all TCP onnections are reset. But how to do this (without upgrade...) on 11.5.5 version.

On 11.5.5 version "Action On Service Down feature" is only available on the pool configuration. and don't reset TCP connections on the VS associated?

0
Comment made 03-Sep-2018 by Tyler Shaw

Are you resetting existing connections, or wanting to reset new connections? If there are no pool members available, and a new connection comes in they should get a reset.

If you want to reset existing connections when a pool member goes down, then you'll have to resort to an iRule to do so.

0