Forum Discussion

Keith_04's avatar
Keith_04
Icon for Nimbostratus rankNimbostratus
Jan 14, 2017

Wide ip selection based on pool members

I have three non-LTM VIP's, which I have added to the GTM as generic hosts. If any of these VIP's fails, I need to move all three VIP's over to the other data center.

My plan: Create a pool called VIPs and place the three non-LTM VIP's into it. Create an iRule that checks if active members is equal to members (i.e. everything is up), if so respond back with data center 1 IP, if not respond back with data center 2.

I have built this out, VIP's in data center 1 are up but when I query the wide-ip I receive a non-existence domain error. Other wide-ip's work as expected.

My iRule (a snippet):

when DNS_REQUEST { 
switch [DNS::question name] {
work.somedomain.com {
     if { [active_members vips ] < [members vips ] } {
       pool datacenter2IP 
    } else {
       pool datacenter1IP
 }
}
}
}

Will this work or am I off in my thinking?

1 Reply

    1. What result are you getting without the iRule attached to the WIP ?

       

    2. When you say other WIPs are working as expected, do they have similar iRule and other settings on the F5 ?