Forum Discussion
BB1030_11211
Nimbostratus
Dec 20, 2012How to influence load balancing based on the source IP address
Hi, I have 2 GTMs in 2 Data Centers that geographically disersed in CA and VA, I want users to be directed to servers that are local to each Data Center instead of the GTM returning an IP address of ...
Ajmal_2608
Nimbostratus
Dec 21, 2012Hi BB1030,
For influencing the result based on source IP, try following rule
rule "SourceIP-rule" {
when DNS_REQUEST {
if { [IP::addr [IP::client_addr] equals 10.x.x.x/24] \
or [IP::addr [IP::client_addr] equals 11.x.x.x/24] } {
cname "host.something.com""
}
}
}
in place of cname you can write any action you want, list can be found @ https://devcentral.f5.com/wiki/iRules.GTM.ashx
Cheers
Ajmal
Help guide the future of your DevCentral Community!
What tools do you use to collaborate? (1min - anonymous)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