Forum Discussion

kartheeswaran_1's avatar
Jul 19, 2017

IRULE FOR GTM TOPOLOGY LOADBALANCING

In bigipdns user configured a wide ip with topology load balancing with 2 existing Datacenter (US and japan). Now user needs to configure 2nd wide ip with same setup with below modification.

 

If any source from Banglore needs to reach banglore Physical server. If any source from Hyderabad needs to reach Hyderabad physical server. If any source from Singapore needs to reach Singapore physical server. Other than this any Source IP from US region will reach US datacenter & Asia related region will reach Japan Data center. kindly provide a irule for this.

 

1 Reply

  • Maybe this will work for you.

    gtm rule IRULE {
    when DNS_REQUEST {
      if { [ matchregion ldns Banglore ] } {
        pool Banglore-pool
      } elseif { [ matchregion ldns Hyderabad ] } {
        pool Hyderabad-pool
      } elseif { [ matchregion ldns Singapore ] } {
        pool Singapore-pool
      } else {
        pool US_Asia-pool
      }
    }
    
    create gtm region Banglore { region-members add { subnet x.x.x.x/32 } } 
    create gtm region Hyderabad { region-members add { subnet x.x.x.x/32 } } 
    create gtm region Singapore { region-members add { subnet x.x.x.x/32 } } 
    

    x.x.x.x is the LDNS for each region/country