Forum Discussion
fab_catalano_10
Nimbostratus
May 07, 2009GTM 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!
- The_Bhattman
Nimbostratus
How about the followingwhen 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 } }
Recent Discussions
Related Content
DevCentral Quicklinks
* Getting Started on DevCentral
* Community Guidelines
* Community Terms of Use / EULA
* Community Ranking Explained
* Community Resources
* Contact the DevCentral Team
* Update MFA on account.f5.com
Discover DevCentral Connects