For more information regarding the security incident at F5, the actions we are taking to address it, and our ongoing efforts to protect our customers, click here.

Forum Discussion

BB1030_11211's avatar
BB1030_11211
Icon for Nimbostratus rankNimbostratus
Dec 20, 2012

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

  • 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
  • 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's avatar
    JG
    Icon for Cumulonimbus rankCumulonimbus

    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?