Forum Discussion

fab_catalano_10's avatar
fab_catalano_10
Icon for Nimbostratus rankNimbostratus
May 07, 2009

GTM iRule - status check

I want to be able to resolve to a WideIP based on what IP network the request originated from.

 

 

I have been able to do this but now i would like to add a check to see if that pool is available before resolving.

 

 

This is what i have so far but it does not seem to change when i mark the pools down in GTM...

 

 

 

determine DNS resolution based on network

 

when DNS_REQUEST {

 

BG1 NT Server VLAN

 

if { ( [IP::addr [IP::remote_addr]/22 equals 10.92.80.0/22] )

 

and ( [LB::status pool mtgdc.mortgagesvcs member 10.92.36.110 389 "up"] ) } {

 

host 10.92.36.110 }

 

elseif { ( [IP::addr [IP::remote_addr]/22 equals 10.92.80.0/22] )

 

and ( [LB::status pool mtgdc.mortgagesvcs member 10.92.36.110 389 "down"] ) } {

 

host 10.92.40.110

 

BG4 QA/DEV VLAN

 

} elseif {[IP::addr [IP::remote_addr]/22 equals 10.92.200.0/22] } {

 

host 10.92.36.110

 

MV1 NT Server VLAN

 

} elseif {[IP::addr [IP::remote_addr]/22 equals 10.92.48.0/22] } {

 

host 10.92.40.110

 

}

 

}

 

 

 

Thanks in advance!
  • How about the following

     
     when DNS_REQUEST { 
     if {([IP::addr [IP::remote_addr]/22 equals 10.92.80.0/22]) and ([active_members mtgdc.mortgagesvcs] < 0)}{ 
     host 10.92.36.110 
     } elseif { ([IP::addr [IP::remote_addr]/22 equals 10.92.80.0/22]) and ([active_members mtgdc.mortgagesvcs ] == 0)}{ 
     host 10.92.40.110 
     } elseif {[IP::addr [IP::remote_addr]/22 equals 10.92.200.0/22] }{ 
     host 10.92.36.110 
     } elseif {[IP::addr [IP::remote_addr]/22 equals 10.92.48.0/22] }{ 
     host 10.92.40.110  
     } 
     } 
     

    Hope this helps

    CB