Forum Discussion
How 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 a server that is lcoated in the opposite data center when performing a DNS query, can I set this in the GTM to prefer a pool based on the source IP subnet? Thanks in advance.
3 Replies
- Ajmal_2608
Nimbostratus
Hi 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 - Cory_50405
Noctilucent
You can also use topology based load balancing. We are using this method in our environment and it works. Eastern US states prefer our east coast data center, west coast states prefer our west coast data center, etc. Read about it here:
http://support.f5.com/kb/en-us/products/big-ip_gtm/manuals/product/gtm_config_guide_10_1/gtm_topology_newest.html - JG
Cumulonimbus
The gripe I have about all such documentation is that it does not tell you how it actually works technically. How does it "route" a dns request to a gtm in another data centre?
Help guide the future of your DevCentral Community!
What tools do you use to collaborate? (1min - anonymous)Recent Discussions
Related Content
* 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