Forum Discussion

rmehta_78024's avatar
rmehta_78024
Icon for Nimbostratus rankNimbostratus
Jan 23, 2009

iRule for replying host unreacheable if pool memebers down.

Hi,

 

I need help in writing an iRule which will reply host unrecheable to ping request if certain number of pool members are down.

 

 

Please can someone help.

 

 

Thx.

 

rm

3 Replies

  • Hi rm,

     

     

    ICMP is used to check if an IP address is available. A virtual server is an IP address and port combination. I don't think you could modify ICMP responses based on a single virtual server (or virtual server's pool's) status using an iRule.

     

     

    I suppose you could use an iControl script to modify the virtual address state based on a pool's status.

     

     

    What is polling the virtual server IP address? Could you have it do a service level check instead of using ICMP? ie, make a request to a specific IP:port instead of just the IP? If that was possible, then you could potentially use an iRule to send back a custom response based on the pool state.

     

     

    Aaron
  • Hi Aaron,

     

    Downstream router is tracking ip address configured on f5 using icmp.Incase xx number of pool memners are down we would want downstream router to forward traffic to another site.IP tracking can only be done on icmp responses as per device limitation.

     

     

    As per F5 support Virtual server always responds positively to icmp.

     

     

     

    I was considering following.

     

    Virtualserver 1.1.1.1:1(listen on icmp)

     

    pool member 127.0.0.1

     

     

    and then assign Irule

     

     

    when client data if min members pool < 5

     

    " send icmp host unrecheable"

     

     

     

    I need actual irule statements for

     

    sending icmp host unrecheable

     

     

     

    Thx.

     

    rm
  • Deb_Allen_18's avatar
    Deb_Allen_18
    Historic F5 Account
    sry, rm, there are no statements currently available in iRules to send an ICMP unreachable response, and I'm not aware of any way to affect the virtual server address status independent of the status of the resources associated with it.